Rownum where text changes

mbdowty

Board Regular
Joined
Mar 19, 2003
Messages
175
I have a column of text data. I'm looking for a simple formula to return the row number where the text value changes.
A B
1 Zulu
2 Apple
3 Apple
4 Apple
5 Zulu
6 Zulu
7 Baker
8 Baker
9 Charlie
10 Charlie


In the list above, I'd like to know that given "Zulu" as an input in cell $b$1, the formula would return 7 (the row where Zulu has changed to Baker).
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

mbdowty

Board Regular
Joined
Mar 19, 2003
Messages
175
Sorry, the formatting didn't work well when entering that question.

Note: Cell A1=<blank>, B1="Zulu"
A2=Apple
A3=Apple....etc.
 

Ragnar1211

Well-known Member
Joined
Jul 10, 2008
Messages
571
Based on your table shouldn't the first change of Zulu result in Apple? - Row 2?
 

mbdowty

Board Regular
Joined
Mar 19, 2003
Messages
175
See the note on the formatting.

A1 is blank
Zulu is the key and should be in B1....sorry for the formatting mess.
 

Ragnar1211

Well-known Member
Joined
Jul 10, 2008
Messages
571
This will only work if the data is sorted in order to group the like names:

Code:
=MATCH(B1,$A$2:$A$10,0)+COUNTIF($A$2:$A$10,B1)+1
 

mbdowty

Board Regular
Joined
Mar 19, 2003
Messages
175
Thank you. So simple. I was stuck on trying to figure out a Rank function.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,402
Messages
5,601,475
Members
414,452
Latest member
Dannysamworth

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
Top