Finding A Row Number...

Aitch

Board Regular
Joined
Jan 27, 2019
Messages
119
Office Version
  1. 2010
Platform
  1. Windows
I'm sure this is simple - but I can't get anything to work lol

Column A has a row of numbers covering a range - 1 to X

What formula will find the row when the values start from 1 again - so I can get the row where the range ends?

For example below:
1st range is 1-4 so I need the Row of the value 4 = 4
2nd range is 1-3 so I need the Row of the value 3 = 7
3rd range is 1-2 so I need the row of the value 2 = 9

1=Row number 4
2
3
4<<< 4
1= Row number 7
2
3<<< 7
1= Row number 9
2<<< 9
1

Thanks for any help!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Does this do what you want?
Book1
AB
114
22 
33 
44 
517
62 
73 
819
92 
10110
Sheet1
Cell Formulas
RangeFormula
B1:B9B1=IF(A1=1,MATCH(1,A2:$A$10,0)+IF(ROW()<>1,ROW()-1,0),"")
B10B10=IF(A10=1,MATCH(1,A$10:$A11,0)+IF(ROW()<>1,ROW()-1,0),"")
 
Upvote 0
Another option
+Fluff v2.xlsm
AB
11 
22 
33 
444
51 
62 
737
81 
929
101 
Result
Cell Formulas
RangeFormula
B1:B10B1=IF(IFNA(MATCH(1,A2:A10,0),0)=1,ROW(),"")
 
Upvote 0
Thank you!

How can I amend this if I add an extra column for the date - can I MATCH the first non-blank cell in column A?

1st Jan14
2
3
4
2nd Jan17
2
3
3rd Jan19
2
4th Jan110
 
Upvote 0
How about
+Fluff v2.xlsm
ABC
11st Jan14
22 
33 
44 
52nd Jan17
62 
73 
83rd Jan19
92 
104th Jan110
Result
Cell Formulas
RangeFormula
C1:C9C1=IF(A1="","",INDEX(ROW(A1:A$10),MATCH(FALSE,ISBLANK(A2:A$10),0)))
C10C10=IF(A10="","",INDEX(ROW(A10:A$10),MATCH(FALSE,ISBLANK(A$10:A11),0)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you!

Is there any way which does not need an Array Formula?
 
Upvote 0
What's wrong with using an array formula?
 
Upvote 0
If you want a non CSE version, how about
Excel Formula:
=IF(A1="","",AGGREGATE(15,6,ROW(A1:A$10)/(A2:A$10<>""),1))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,381
Messages
6,119,192
Members
448,874
Latest member
Lancelots

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