enter numbers in blank cells

G

Guest

I have a formula as follows, IF(B2="DISTANCE",MAX($A$1:A1)+1,"")
this works great, but I also need to have the blank cells in between the
numbers filled in with numbers eg:

I have need to have:
A1 1 A1 1
A2 blank A2 1
A3 blank A3 1
A4 2 A4 2
A5 blank A5 2
A6 blank A6 2
A7 blank A7 2
A8 blank A8 2
A9 blank A9 2
A10 3 A10 3
A11 blank A11 3
down to 300 rows
Can any one help me please ?

Thank You All
regards bill gras
 
G

Guest

It's not entirely clear what the problem is. Does your formula reside in
column A? If so, then try th is variation:

=MAX($A$1:A1)+IF(B2="DISTANCE",1,0)
 
G

Guest

Another option, from row 2 on, is to replace the "" in your fomula with A1.
That way, instead of a blank, you would carry down the value from the row
above.
 

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