(Exodus 16:35) "And the children of Israel ate the manna forty years." It is impossible to say "until they came to an inhabited land," for it already says "to the edge of the land of Canaan"; and it is impossible to say "to the edge of the land of Canaan," for it already says "to an inhabited land." How so? On the seventh of Adar Moses died and the manna stopped coming down, and they were supplied from the manna in their vessels until the sixteenth of Nisan. Another teaching: "And the children of Israel ate," etc. Did they eat it forty years? Rather, the cakes that Israel brought out of Egypt, in them they tasted the taste of manna. "And the children of Israel ate the manna" forty days after the death of Moses. How so? Moses died on the seventh of Adar, and they ate from it twenty-four days of Adar and sixteen of Nisan, as it is said (Joshua 5:12), "And the manna ceased on the next day." Rabbi Eleazar of Modi'in says: seventy days they ate the manna after the death of Moses. How so? Moses died on the seventh of the first Adar, and they ate from it twenty-four days of the first Adar and thirty of the second Adar, for it was a leap year, and sixteen of Nisan, as it is said, "And the manna ceased on the next day." Rabbi Eliezer says: seventy days Israel ate the manna after the death of Moses. How so? Moses died on the seventh of Shevat and they ate from it twenty-four days of Shevat and thirty of Adar, and that year was not a leap year, and sixteen of Nisan, as it is said, "And the manna ceased." Rabbi says: fifty-four years Israel ate the manna, forty years in the lifetime of Moses, as it is said, "And the children of Israel ate the manna," for there is no need for Scripture to say "the manna they ate until they came to the edge of the land of Canaan"; rather these are the fourteen years after the death of Moses, namely the seven of conquest and the seven of division. When Miriam died the well was removed; when Aaron died the pillar of cloud was removed, and both returned by the merit of Moses. When Moses died all three were removed and did not return. And the hornet did not cross the Jordan with them.
How Long Israel Ate the Manna in the Wilderness
Yalkut Shimoni on Torah 261:12
(שמות טז לה) וּבְנֵי יִשְׂרָאֵל אָכְלוּ אֶת הַמָּן אַרְבָּעִים שָׁנָה. אִי אֶפְשָׁר לוֹמַר עַד בֹּאָם אֶל אֶרֶץ נוֹשֶׁבֶת, שֶׁהֲרֵי כְּבָר נֶאֱמַר אֶל קְצֵה אֶרֶץ כְּנָעַן, וְאִי אֶפְשָׁר לוֹמַר אֶל קְצֵה אֶרֶץ כְּנָעַן, שֶׁהֲרֵי כְּבָר נֶאֱמַר אֶל אֶרֶץ נוֹשֶׁבֶת הָא כֵּיצַד, בְּשִׁבְעָה בַּאֲדָר מֵת מֹשֶׁה וּפָסַק מָן מִלֵּירֵד וְהָיוּ מִסְתַּפְּקִים מִן מָן שֶׁבַּכֵּלִים עַד (ט"ו) [שִׁשָּׁה עָשָׂר] בְּנִיסָן. תַּנְיָא אִידָךְ, וּבְנֵי יִשְׂרָאֵל אָכְלוּ וְגוֹ'. וְכִי אַרְבָּעִים שָׁנָה אָכְלוּ, אֶלָּא עוּגוֹת שֶׁהוֹצִיאוֹ יִשְׂרָאֵל מִמִּצְרַיִם טָעֲמוּ בָּהּ טַעַם מָן. וּבְנֵי יִשְׂרָאֵל אָכְלוּ אֶת הַמָּן. אַרְבָּעִים יוֹם לְאַחַר מִיתָתוֹ שֶׁל מֹשֶׁה, כֵּיצַד, מֹשֶׁה מֵת בְּשִׁבְעָה בַאֲדָר, וְאָכְלוּ הֵימֶנּוּ עֶשְּׂרִים וְאַרְבַּע שֶׁל אֲדָר, וְשִׁשָּׁה עָשָׂר שֶׁל נִיסָן, שֶׁנֶּאֱמַר (יהושע ה, יב) "וַיִּשְׁבֹּת הַמָּן מִמָּחֳרָת". רַבִּי אֶלְעָזָר הַמּוֹדָעִי אוֹמֵר, שִׁבְעִים יוֹם אָכְלוּ אֶת הַמָּן אַחֲרֵי מִיתָתוֹ שֶׁל מֹשֶׁה, הָא כֵּיצַד, מֹשֶׁה מֵת בְּשִׁבְעָה בַּאֲדָר, וְאָכְלוּ הֵימֶנּוּ עֶשְּׂרִים וְאַרְבַּע יוֹם שֶׁל אֲדָר הָרִאשׁוֹן, וּשְׁלֹשִׁים שֶׁל אֲדָר הַשֵּׁנִי, שֶׁשְּׁנַת עִבּוּר הָיְתָה, וְשִׁשָּׁה עָשָׂר שֶׁל נִיסָן, שֶׁנֶּאֱמַר "וַיִּשְׁבֹּת הַמָּן מִמָּחֳרָת". רַבִּי אֱלִיעֶזֶר אוֹמֵר, שִׁבְעִים יוֹם אָכְלוּ יִשְׂרָאֵל אֶת הַמָּן אַחֲר מִיתָתוֹ שֶׁל מֹשֶׁה, כֵּיצַד, מֹשֶׁה מֵת בְּשִׁבְעָה בִּשְׁבָט וְאָכְלוּ הֵימֶנּוּ עֶשְּׂרִים וְאַרְבַּע שֶׁל שְׁבָט, וּשְׁלֹשִׁים שֶׁל אֲדָר וְאוֹתָהּ שָׁנָה לֹא הָיְתָה מֵעוּבֶּרֶת, וְשִׁשָּׁה עָשָׂר שֶׁל נִיסָן, שֶׁנֶּאֱמַר (שם) "וַיִּשְׁבֹּת הַמָּן". רַבִּי אוֹמֵר, חֲמִישִּׁים וְאַרְבָּעָה שָׁנִים אָכְלוּ יִשְׂרָאֵל אֶת הַמָּן אַרְבָּעִים שָׁנָה בְּחַיָּיו שֶׁל מֹשֶׁה, שֶׁנֶּאֱמַר וּבְנֵי יִשְׂרָאֵל אָכְלוּ אֶת הַמָּן, שֶׁאֵין תַּלְמוּד לוֹמַר אֶת הַמָּן אָכְלוּ עַד בֹּאָם אֶל קְצֵה אֶרֶץ כְּנָעַן, אֶלָּא אֵלּוּ אַרְבַּע עֶשְׂרֵה שָׁנָה אַחַר מִיתָתוֹ שֶׁל מֹשֶׁה, וְאֵלּוּ הֵן שֶׁבַע שֶׁכִּבְּשׁוּ וְשֶׁבַע שֶׁחִלְּקוּ. מֵתָה מִרְיָם נִסְתַּלְקָה הַבְּאֵר, מֵת אַהֲרֹן נִסְתַּלֵק עַמּוּד הֶעָנָן, וְחָזְרוּ שְׁנֵיהֶם בִּזְכוּת מֹשֶׁה. מֵת מֹשֶׁה נִסְתַּלְּקוּ שְׁלָשְׁתָּן וְלֹא חָזְרוּ. וְהַצִּרְעָה לֹא עָבְרָה עִמָּהֶן אֵת הַיַּרְדֵּן.