Identifying Row Number Based on Date

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
349
Office Version
  1. 365
Platform
  1. Windows
Hi

Looking for formulas in cells A15 to B17 which give the first (Start) and last (End) row number of the months shown in column C.

Thanks





Book1.xlsx
ABC
1Text
2Text
301/10/21
410/10/21
517/10/21
621/10/21
701/11/21
802/11/21
917/11/21
1006/12/21
1121/12/21
1225/12/21
13
14StartEnd
1536Oct
1679Nov
171012Dec
Sheet1
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about:

Dante Amor
ABC
1Text
2Text
301/10/2021
410/10/2021
517/10/2021
621/10/2021
701/11/2021
802/11/2021
917/11/2021
1006/12/2021
1121/12/2021
1225/12/2021
13
14StartEnd
153601/10/2021
167901/11/2021
17101201/12/2021
Hoja2
Cell Formulas
RangeFormula
A15:A17A15=MIN(IF(MONTH($A$3:$A$12)=MONTH($C15),ROW($A$3:$A$12)))
B15:B17B15=MAX(IF(MONTH($A$3:$A$12)=MONTH($C15),ROW($A$3:$A$12)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks Dante -

I have use the suggestion above and was careful to use CTRL+SHIFT+ENTER but it is returning a #VALUE!

I will continue to see if I can get it to work - open to suggestions ?
 
Upvote 0
Does it matter that the dates in colum A (rows 3 to 12) are derived from a formula ?
 
Upvote 0
How about
+Fluff 1.xlsm
ABC
1Text
2Text
301/10/2021
410/10/2021
517/10/2021
621/10/2021
701/11/2021
802/11/2021
917/11/2021
1006/12/2021
1121/12/2021
1225/12/2021
13
14StartEnd
153601/10/2021
167901/11/2021
17101201/12/2021
18
Main
Cell Formulas
RangeFormula
A15:A17A15=XMATCH(MONTH(C15),MONTH($A$1:$A$12),0,1)
B15:B17B15=XMATCH(MONTH(C15),MONTH($A$1:$A$12),0,-1)
 
Upvote 0
Solution
Does it matter that the dates in colum A (rows 3 to 12) are derived from a formula ?
It doesn't matter, as long as the result is a date.
It is also important that in cells C15, C16 and C17 you have dates.
 
Upvote 0
Hi Dante & Fluff

Not sure what was happening on my end but I could only get it work with the XMATCH function.

Appreciate both of your help.

Thanks
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,521
Members
449,088
Latest member
RandomExceller01

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