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).
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,855
Messages
5,834,001
Members
430,250
Latest member
Reggie Mcqueen

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