Excel/Identify the specific re-occurrence number of a text string in a column
The "Countif" function will count the total number of identified variables, but I am trying to identify the actual sequential number of the variable found in a list.
Ex: If the name "Smith" appears in B3,B10,and B24, can a formula in A identify B3 as the first occurrence ("1"), B10 as the second ("2") occurrence of Smith, etc.?
I then want to concatenate "Smith" and "2" to create a unique variable as a look-up value from a table. (I already do this - "Smith2").
It would be possible to return the row of that occurance using an array formula.
an easier way might be to go to the next available column (say column F) and in F2 put in a formula
=countif($B$1:$B2,B2) and drag fill down column F. This will give you the occurance number for that particular value in column B.
as you pull that formula down, the first range $B$1 will remain fixed - but the second $B2 will be $B3 in rows 3, $B4 in row 4 and so forth so the countif will produce the sequence number for the re-occurance.
You could then say use the column next to column F (column G) to combine those results
then drag fill that down.
That seems the easiest way to me.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here