DEFINE MONTH BASE ON CERTAIN DATES (EXCEL)

mohdamir1989

New Member
Joined
Oct 17, 2017
Messages
42
Hi All,

I have little to no knowledge about the below scenario I just received.

We do billing cycle from 21st to 20 of each month. I have data of 2 years which contains more than 1 lac entries.

I want to name the closing month in last of data.

Closing date 12/21/2022 (mm,dd,yyyy).

What I am trying to achieve is to define 21st Dec 2022 to 20th Jan 2023 as January 2023


Your kind support is highly appreciated

Thanking in anticipation
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try this:

Book1
AB
1Transaction DateStatement Month
22022-01-01January 2022
32022-01-02January 2022
42022-01-03January 2022
52022-01-04January 2022
62022-01-05January 2022
72022-01-06January 2022
82022-01-07January 2022
92022-01-08January 2022
102022-01-09January 2022
112022-01-10January 2022
122022-01-11January 2022
132022-01-12January 2022
142022-01-13January 2022
152022-01-14January 2022
162022-01-15January 2022
172022-01-16January 2022
182022-01-17January 2022
192022-01-18January 2022
202022-01-19January 2022
212022-01-20January 2022
222022-01-21February 2022
232022-01-22February 2022
242022-01-23February 2022
252022-01-24February 2022
262022-01-25February 2022
272022-01-26February 2022
282022-01-27February 2022
292022-01-28February 2022
302022-01-29February 2022
312022-01-30February 2022
322022-01-31February 2022
332022-02-01February 2022
342022-02-02February 2022
352022-02-03February 2022
362022-02-04February 2022
372022-02-05February 2022
382022-02-06February 2022
392022-02-07February 2022
402022-02-08February 2022
412022-02-09February 2022
422022-02-10February 2022
432022-02-11February 2022
442022-02-12February 2022
452022-02-13February 2022
462022-02-14February 2022
472022-02-15February 2022
482022-02-16February 2022
492022-02-17February 2022
502022-02-18February 2022
512022-02-19February 2022
522022-02-20February 2022
532022-02-21March 2022
542022-02-22March 2022
552022-02-23March 2022
562022-02-24March 2022
572022-02-25March 2022
582022-02-26March 2022
592022-02-27March 2022
602022-02-28March 2022
612022-03-01March 2022
622022-03-02March 2022
632022-03-03March 2022
642022-03-04March 2022
652022-03-05March 2022
662022-03-06March 2022
672022-03-07March 2022
682022-03-08March 2022
692022-03-09March 2022
702022-03-10March 2022
712022-03-11March 2022
722022-03-12March 2022
732022-03-13March 2022
742022-03-14March 2022
752022-03-15March 2022
762022-03-16March 2022
772022-03-17March 2022
782022-03-18March 2022
792022-03-19March 2022
802022-03-20March 2022
812022-03-21April 2022
822022-03-22April 2022
832022-03-23April 2022
842022-03-24April 2022
852022-03-25April 2022
862022-03-26April 2022
872022-03-27April 2022
882022-03-28April 2022
892022-03-29April 2022
902022-03-30April 2022
912022-03-31April 2022
922022-04-01April 2022
932022-04-02April 2022
942022-04-03April 2022
952022-04-04April 2022
962022-04-05April 2022
972022-04-06April 2022
982022-04-07April 2022
992022-04-08April 2022
1002022-04-09April 2022
1012022-04-10April 2022
1022022-04-11April 2022
1032022-04-12April 2022
1042022-04-13April 2022
1052022-04-14April 2022
1062022-04-15April 2022
1072022-04-16April 2022
1082022-04-17April 2022
1092022-04-18April 2022
1102022-04-19April 2022
1112022-04-20April 2022
1122022-04-21May 2022
1132022-04-22May 2022
1142022-04-23May 2022
1152022-04-24May 2022
1162022-04-25May 2022
1172022-04-26May 2022
1182022-04-27May 2022
1192022-04-28May 2022
1202022-04-29May 2022
1212022-04-30May 2022
1222022-05-01May 2022
1232022-05-02May 2022
1242022-05-03May 2022
1252022-05-04May 2022
1262022-05-05May 2022
1272022-05-06May 2022
1282022-05-07May 2022
1292022-05-08May 2022
1302022-05-09May 2022
1312022-05-10May 2022
1322022-05-11May 2022
1332022-05-12May 2022
1342022-05-13May 2022
1352022-05-14May 2022
1362022-05-15May 2022
1372022-05-16May 2022
1382022-05-17May 2022
1392022-05-18May 2022
1402022-05-19May 2022
1412022-05-20May 2022
1422022-05-21June 2022
1432022-05-22June 2022
1442022-05-23June 2022
1452022-05-24June 2022
1462022-05-25June 2022
1472022-05-26June 2022
1482022-05-27June 2022
1492022-05-28June 2022
1502022-05-29June 2022
1512022-05-30June 2022
1522022-05-31June 2022
1532022-06-01June 2022
1542022-06-02June 2022
1552022-06-03June 2022
1562022-06-04June 2022
1572022-06-05June 2022
1582022-06-06June 2022
1592022-06-07June 2022
1602022-06-08June 2022
1612022-06-09June 2022
1622022-06-10June 2022
1632022-06-11June 2022
1642022-06-12June 2022
1652022-06-13June 2022
1662022-06-14June 2022
1672022-06-15June 2022
1682022-06-16June 2022
1692022-06-17June 2022
1702022-06-18June 2022
1712022-06-19June 2022
1722022-06-20June 2022
1732022-06-21July 2022
1742022-06-22July 2022
1752022-06-23July 2022
1762022-06-24July 2022
1772022-06-25July 2022
1782022-06-26July 2022
1792022-06-27July 2022
1802022-06-28July 2022
1812022-06-29July 2022
1822022-06-30July 2022
1832022-07-01July 2022
1842022-07-02July 2022
1852022-07-03July 2022
1862022-07-04July 2022
1872022-07-05July 2022
1882022-07-06July 2022
1892022-07-07July 2022
1902022-07-08July 2022
1912022-07-09July 2022
1922022-07-10July 2022
1932022-07-11July 2022
1942022-07-12July 2022
1952022-07-13July 2022
1962022-07-14July 2022
1972022-07-15July 2022
1982022-07-16July 2022
1992022-07-17July 2022
2002022-07-18July 2022
2012022-07-19July 2022
2022022-07-20July 2022
2032022-07-21August 2022
2042022-07-22August 2022
2052022-07-23August 2022
2062022-07-24August 2022
2072022-07-25August 2022
2082022-07-26August 2022
2092022-07-27August 2022
2102022-07-28August 2022
2112022-07-29August 2022
2122022-07-30August 2022
2132022-07-31August 2022
2142022-08-01August 2022
2152022-08-02August 2022
2162022-08-03August 2022
2172022-08-04August 2022
2182022-08-05August 2022
2192022-08-06August 2022
2202022-08-07August 2022
2212022-08-08August 2022
2222022-08-09August 2022
2232022-08-10August 2022
2242022-08-11August 2022
2252022-08-12August 2022
2262022-08-13August 2022
2272022-08-14August 2022
2282022-08-15August 2022
2292022-08-16August 2022
2302022-08-17August 2022
2312022-08-18August 2022
2322022-08-19August 2022
2332022-08-20August 2022
2342022-08-21September 2022
2352022-08-22September 2022
2362022-08-23September 2022
2372022-08-24September 2022
2382022-08-25September 2022
2392022-08-26September 2022
2402022-08-27September 2022
2412022-08-28September 2022
2422022-08-29September 2022
2432022-08-30September 2022
2442022-08-31September 2022
2452022-09-01September 2022
2462022-09-02September 2022
2472022-09-03September 2022
2482022-09-04September 2022
2492022-09-05September 2022
2502022-09-06September 2022
2512022-09-07September 2022
2522022-09-08September 2022
2532022-09-09September 2022
2542022-09-10September 2022
2552022-09-11September 2022
2562022-09-12September 2022
2572022-09-13September 2022
2582022-09-14September 2022
2592022-09-15September 2022
2602022-09-16September 2022
2612022-09-17September 2022
2622022-09-18September 2022
2632022-09-19September 2022
2642022-09-20September 2022
2652022-09-21October 2022
2662022-09-22October 2022
2672022-09-23October 2022
2682022-09-24October 2022
2692022-09-25October 2022
2702022-09-26October 2022
2712022-09-27October 2022
2722022-09-28October 2022
2732022-09-29October 2022
2742022-09-30October 2022
2752022-10-01October 2022
2762022-10-02October 2022
2772022-10-03October 2022
2782022-10-04October 2022
2792022-10-05October 2022
2802022-10-06October 2022
2812022-10-07October 2022
2822022-10-08October 2022
2832022-10-09October 2022
2842022-10-10October 2022
2852022-10-11October 2022
2862022-10-12October 2022
2872022-10-13October 2022
2882022-10-14October 2022
2892022-10-15October 2022
2902022-10-16October 2022
2912022-10-17October 2022
2922022-10-18October 2022
2932022-10-19October 2022
2942022-10-20October 2022
2952022-10-21November 2022
2962022-10-22November 2022
2972022-10-23November 2022
2982022-10-24November 2022
2992022-10-25November 2022
3002022-10-26November 2022
3012022-10-27November 2022
3022022-10-28November 2022
3032022-10-29November 2022
3042022-10-30November 2022
3052022-10-31November 2022
3062022-11-01November 2022
3072022-11-02November 2022
3082022-11-03November 2022
3092022-11-04November 2022
3102022-11-05November 2022
3112022-11-06November 2022
3122022-11-07November 2022
3132022-11-08November 2022
3142022-11-09November 2022
3152022-11-10November 2022
3162022-11-11November 2022
3172022-11-12November 2022
3182022-11-13November 2022
3192022-11-14November 2022
3202022-11-15November 2022
3212022-11-16November 2022
3222022-11-17November 2022
3232022-11-18November 2022
3242022-11-19November 2022
3252022-11-20November 2022
3262022-11-21December 2022
3272022-11-22December 2022
3282022-11-23December 2022
3292022-11-24December 2022
3302022-11-25December 2022
3312022-11-26December 2022
3322022-11-27December 2022
3332022-11-28December 2022
3342022-11-29December 2022
3352022-11-30December 2022
3362022-12-01December 2022
3372022-12-02December 2022
3382022-12-03December 2022
3392022-12-04December 2022
3402022-12-05December 2022
3412022-12-06December 2022
3422022-12-07December 2022
3432022-12-08December 2022
3442022-12-09December 2022
3452022-12-10December 2022
3462022-12-11December 2022
3472022-12-12December 2022
3482022-12-13December 2022
3492022-12-14December 2022
3502022-12-15December 2022
3512022-12-16December 2022
3522022-12-17December 2022
3532022-12-18December 2022
3542022-12-19December 2022
3552022-12-20December 2022
3562022-12-21January 2023
3572022-12-22January 2023
3582022-12-23January 2023
3592022-12-24January 2023
3602022-12-25January 2023
3612022-12-26January 2023
3622022-12-27January 2023
3632022-12-28January 2023
3642022-12-29January 2023
3652022-12-30January 2023
3662022-12-31January 2023
3672023-01-01January 2023
Sheet1
Cell Formulas
RangeFormula
B2:B367B2=EOMONTH(A2,--(DAY(A2)>=21))
 
Upvote 0
Solution
Try this:

Book1
AB
1Transaction DateStatement Month
22022-01-01January 2022
32022-01-02January 2022
42022-01-03January 2022
52022-01-04January 2022
62022-01-05January 2022
72022-01-06January 2022
82022-01-07January 2022
92022-01-08January 2022
102022-01-09January 2022
112022-01-10January 2022
122022-01-11January 2022
132022-01-12January 2022
142022-01-13January 2022
152022-01-14January 2022
162022-01-15January 2022
172022-01-16January 2022
182022-01-17January 2022
192022-01-18January 2022
202022-01-19January 2022
212022-01-20January 2022
222022-01-21February 2022
232022-01-22February 2022
242022-01-23February 2022
252022-01-24February 2022
262022-01-25February 2022
272022-01-26February 2022
282022-01-27February 2022
292022-01-28February 2022
302022-01-29February 2022
312022-01-30February 2022
322022-01-31February 2022
332022-02-01February 2022
342022-02-02February 2022
352022-02-03February 2022
362022-02-04February 2022
372022-02-05February 2022
382022-02-06February 2022
392022-02-07February 2022
402022-02-08February 2022
412022-02-09February 2022
422022-02-10February 2022
432022-02-11February 2022
442022-02-12February 2022
452022-02-13February 2022
462022-02-14February 2022
472022-02-15February 2022
482022-02-16February 2022
492022-02-17February 2022
502022-02-18February 2022
512022-02-19February 2022
522022-02-20February 2022
532022-02-21March 2022
542022-02-22March 2022
552022-02-23March 2022
562022-02-24March 2022
572022-02-25March 2022
582022-02-26March 2022
592022-02-27March 2022
602022-02-28March 2022
612022-03-01March 2022
622022-03-02March 2022
632022-03-03March 2022
642022-03-04March 2022
652022-03-05March 2022
662022-03-06March 2022
672022-03-07March 2022
682022-03-08March 2022
692022-03-09March 2022
702022-03-10March 2022
712022-03-11March 2022
722022-03-12March 2022
732022-03-13March 2022
742022-03-14March 2022
752022-03-15March 2022
762022-03-16March 2022
772022-03-17March 2022
782022-03-18March 2022
792022-03-19March 2022
802022-03-20March 2022
812022-03-21April 2022
822022-03-22April 2022
832022-03-23April 2022
842022-03-24April 2022
852022-03-25April 2022
862022-03-26April 2022
872022-03-27April 2022
882022-03-28April 2022
892022-03-29April 2022
902022-03-30April 2022
912022-03-31April 2022
922022-04-01April 2022
932022-04-02April 2022
942022-04-03April 2022
952022-04-04April 2022
962022-04-05April 2022
972022-04-06April 2022
982022-04-07April 2022
992022-04-08April 2022
1002022-04-09April 2022
1012022-04-10April 2022
1022022-04-11April 2022
1032022-04-12April 2022
1042022-04-13April 2022
1052022-04-14April 2022
1062022-04-15April 2022
1072022-04-16April 2022
1082022-04-17April 2022
1092022-04-18April 2022
1102022-04-19April 2022
1112022-04-20April 2022
1122022-04-21May 2022
1132022-04-22May 2022
1142022-04-23May 2022
1152022-04-24May 2022
1162022-04-25May 2022
1172022-04-26May 2022
1182022-04-27May 2022
1192022-04-28May 2022
1202022-04-29May 2022
1212022-04-30May 2022
1222022-05-01May 2022
1232022-05-02May 2022
1242022-05-03May 2022
1252022-05-04May 2022
1262022-05-05May 2022
1272022-05-06May 2022
1282022-05-07May 2022
1292022-05-08May 2022
1302022-05-09May 2022
1312022-05-10May 2022
1322022-05-11May 2022
1332022-05-12May 2022
1342022-05-13May 2022
1352022-05-14May 2022
1362022-05-15May 2022
1372022-05-16May 2022
1382022-05-17May 2022
1392022-05-18May 2022
1402022-05-19May 2022
1412022-05-20May 2022
1422022-05-21June 2022
1432022-05-22June 2022
1442022-05-23June 2022
1452022-05-24June 2022
1462022-05-25June 2022
1472022-05-26June 2022
1482022-05-27June 2022
1492022-05-28June 2022
1502022-05-29June 2022
1512022-05-30June 2022
1522022-05-31June 2022
1532022-06-01June 2022
1542022-06-02June 2022
1552022-06-03June 2022
1562022-06-04June 2022
1572022-06-05June 2022
1582022-06-06June 2022
1592022-06-07June 2022
1602022-06-08June 2022
1612022-06-09June 2022
1622022-06-10June 2022
1632022-06-11June 2022
1642022-06-12June 2022
1652022-06-13June 2022
1662022-06-14June 2022
1672022-06-15June 2022
1682022-06-16June 2022
1692022-06-17June 2022
1702022-06-18June 2022
1712022-06-19June 2022
1722022-06-20June 2022
1732022-06-21July 2022
1742022-06-22July 2022
1752022-06-23July 2022
1762022-06-24July 2022
1772022-06-25July 2022
1782022-06-26July 2022
1792022-06-27July 2022
1802022-06-28July 2022
1812022-06-29July 2022
1822022-06-30July 2022
1832022-07-01July 2022
1842022-07-02July 2022
1852022-07-03July 2022
1862022-07-04July 2022
1872022-07-05July 2022
1882022-07-06July 2022
1892022-07-07July 2022
1902022-07-08July 2022
1912022-07-09July 2022
1922022-07-10July 2022
1932022-07-11July 2022
1942022-07-12July 2022
1952022-07-13July 2022
1962022-07-14July 2022
1972022-07-15July 2022
1982022-07-16July 2022
1992022-07-17July 2022
2002022-07-18July 2022
2012022-07-19July 2022
2022022-07-20July 2022
2032022-07-21August 2022
2042022-07-22August 2022
2052022-07-23August 2022
2062022-07-24August 2022
2072022-07-25August 2022
2082022-07-26August 2022
2092022-07-27August 2022
2102022-07-28August 2022
2112022-07-29August 2022
2122022-07-30August 2022
2132022-07-31August 2022
2142022-08-01August 2022
2152022-08-02August 2022
2162022-08-03August 2022
2172022-08-04August 2022
2182022-08-05August 2022
2192022-08-06August 2022
2202022-08-07August 2022
2212022-08-08August 2022
2222022-08-09August 2022
2232022-08-10August 2022
2242022-08-11August 2022
2252022-08-12August 2022
2262022-08-13August 2022
2272022-08-14August 2022
2282022-08-15August 2022
2292022-08-16August 2022
2302022-08-17August 2022
2312022-08-18August 2022
2322022-08-19August 2022
2332022-08-20August 2022
2342022-08-21September 2022
2352022-08-22September 2022
2362022-08-23September 2022
2372022-08-24September 2022
2382022-08-25September 2022
2392022-08-26September 2022
2402022-08-27September 2022
2412022-08-28September 2022
2422022-08-29September 2022
2432022-08-30September 2022
2442022-08-31September 2022
2452022-09-01September 2022
2462022-09-02September 2022
2472022-09-03September 2022
2482022-09-04September 2022
2492022-09-05September 2022
2502022-09-06September 2022
2512022-09-07September 2022
2522022-09-08September 2022
2532022-09-09September 2022
2542022-09-10September 2022
2552022-09-11September 2022
2562022-09-12September 2022
2572022-09-13September 2022
2582022-09-14September 2022
2592022-09-15September 2022
2602022-09-16September 2022
2612022-09-17September 2022
2622022-09-18September 2022
2632022-09-19September 2022
2642022-09-20September 2022
2652022-09-21October 2022
2662022-09-22October 2022
2672022-09-23October 2022
2682022-09-24October 2022
2692022-09-25October 2022
2702022-09-26October 2022
2712022-09-27October 2022
2722022-09-28October 2022
2732022-09-29October 2022
2742022-09-30October 2022
2752022-10-01October 2022
2762022-10-02October 2022
2772022-10-03October 2022
2782022-10-04October 2022
2792022-10-05October 2022
2802022-10-06October 2022
2812022-10-07October 2022
2822022-10-08October 2022
2832022-10-09October 2022
2842022-10-10October 2022
2852022-10-11October 2022
2862022-10-12October 2022
2872022-10-13October 2022
2882022-10-14October 2022
2892022-10-15October 2022
2902022-10-16October 2022
2912022-10-17October 2022
2922022-10-18October 2022
2932022-10-19October 2022
2942022-10-20October 2022
2952022-10-21November 2022
2962022-10-22November 2022
2972022-10-23November 2022
2982022-10-24November 2022
2992022-10-25November 2022
3002022-10-26November 2022
3012022-10-27November 2022
3022022-10-28November 2022
3032022-10-29November 2022
3042022-10-30November 2022
3052022-10-31November 2022
3062022-11-01November 2022
3072022-11-02November 2022
3082022-11-03November 2022
3092022-11-04November 2022
3102022-11-05November 2022
3112022-11-06November 2022
3122022-11-07November 2022
3132022-11-08November 2022
3142022-11-09November 2022
3152022-11-10November 2022
3162022-11-11November 2022
3172022-11-12November 2022
3182022-11-13November 2022
3192022-11-14November 2022
3202022-11-15November 2022
3212022-11-16November 2022
3222022-11-17November 2022
3232022-11-18November 2022
3242022-11-19November 2022
3252022-11-20November 2022
3262022-11-21December 2022
3272022-11-22December 2022
3282022-11-23December 2022
3292022-11-24December 2022
3302022-11-25December 2022
3312022-11-26December 2022
3322022-11-27December 2022
3332022-11-28December 2022
3342022-11-29December 2022
3352022-11-30December 2022
3362022-12-01December 2022
3372022-12-02December 2022
3382022-12-03December 2022
3392022-12-04December 2022
3402022-12-05December 2022
3412022-12-06December 2022
3422022-12-07December 2022
3432022-12-08December 2022
3442022-12-09December 2022
3452022-12-10December 2022
3462022-12-11December 2022
3472022-12-12December 2022
3482022-12-13December 2022
3492022-12-14December 2022
3502022-12-15December 2022
3512022-12-16December 2022
3522022-12-17December 2022
3532022-12-18December 2022
3542022-12-19December 2022
3552022-12-20December 2022
3562022-12-21January 2023
3572022-12-22January 2023
3582022-12-23January 2023
3592022-12-24January 2023
3602022-12-25January 2023
3612022-12-26January 2023
3622022-12-27January 2023
3632022-12-28January 2023
3642022-12-29January 2023
3652022-12-30January 2023
3662022-12-31January 2023
3672023-01-01January 2023
Sheet1
Cell Formulas
RangeFormula
B2:B367B2=EOMONTH(A2,--(DAY(A2)>=21))
Awesome, although I am currently not familiar with EOMONTH but will definitely explore. It served the purpose. Thank you so much
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top