View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steved Steved is offline
external usenet poster
 
Posts: 519
Default The 4th column D to be filler.

Thankyou Harlan Just what I required.

"Harlan Grove" wrote:

"T. Valko" wrote...
Using your formula Can it be modified to look in 2
Colums ( Col B and Col C )


If you have a lot rows of data you'd be better off using Harlan's formula
slightly modified:

D1 = 1

D2: =IF(B2&C2=B1&C1,D1+1,1)

....

Now you're assuming that all col B and C entries are similar to the sample
the OP provided. However, if both are strings of digits, there could be some
ambiguity to where the first ended and the second began when they're
concatenated. Therefore, safer to use

D2:
=IF(AND(B2=B1,C2=C1),D1+1,1)

or, for the aesthetes,

=(D1+1)^((B2=B1)*(C2=C1))