Giving a duplicate cell a number

S

scottymelloty

say in column A i had a cell which had "Horse" in it , and it said
"Horse" in randown cells in column A , what formula could i use in
column B so that everytime it recgnised "Horse" in cell A is would
give it a unique number

ie Horse featured in cells
A1
A4
A7
A20

So in the coressponding cell in column B it would have 1,2,3,4 etc
A1 = HORSE B1=1
A4 = HORSE B4=2
A7 = HORSE B7=3

Thanks for any help
 
N

Niek Otten

I'm sure it can be done in one column but I'll give a solution in two
columns. Of course you can hide the middle one.

In B1:
=IF(A1="horse",1,0)
In C1:
=IF(B1=1,1,"")
In B2:
=IF(A2="horse",B1+1,B1)
In C2
=IF(B2=B1,"",B2)

Copy B2 and C2 down

--
Kind regards,

Niek Otten


"scottymelloty" <[email protected]>
wrote in message
news:[email protected]...
 
R

RagDyeR

How about a single column formula:

=IF(A1="Horse",COUNTIF($A$1:A1,"Horse"),"")
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


"scottymelloty" <[email protected]>
wrote in message

Thanks !!! , i can get it working from that, many thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top