I have a excel column containing text values. The values can repeat any number of times in a column. for example here is my column.
AAAA
BBBB
CCCC
BBBB
EEEE
FFFF
BBBB
CCCC
CCCC
DDDD
I need 2 VBA codes which will work as follows:
Code1: this code will return the number of times the cell text has appeared until the current cell. for example, if the current cell is the 9th row, then the output will be 3, because CCCC has appeared 3 times till that cell.
Code2: this code will return the row ID of the n'th occurrence of the text. for example, I want the row number of 2nd appearance of BBBB, so the output will be 4
Can anyone please help with the codes? thanks a lot in advance.