Need help in numbering a column while skipping lines

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

data that i have is

a b c d
jh address telephone number
ar address telephone number
address telephone number

ar address telephone number

column a needs needs number 1,2,3,4,5, etc.
but only if column be is jh or ar
and they need to be consecutive like you use with autofill numbering
but it needs to skip the spaces and yet keep the numbering in order
 
Gary Reger wrote...
data that i have is

a b c d
jh address telephone number
ar address telephone number
address telephone number

ar address telephone number

column a needs needs number 1,2,3,4,5, etc.
but only if column be is jh or ar
and they need to be consecutive like you use with autofill numbering
but it needs to skip the spaces and yet keep the numbering in order

If your topmost row is in row 1, so the topmost col A cell would be A1,
then try these formulas.

A1:
=IF(OR(B1={"jh","ar"}),1,"")

A2:
=IF(OR(B2={"jh","ar"}),1+MAX(A$1:A1),"")

Fill A2 down as far as needed.
 
it did not work here is what i got

1 JH
1 JH
1 AR
1 AR
1 JH
1 JH
1 JH
2 AR
2 JH
2 JH
2 JH
2 JH
2 JH

AR

AR

3 JH
3 AR





4 JH


4 JH
4 JH
4 JH
JH
AR

5 AR



5 JH

5 JH
6 JH
6 AR
6 JH
6 JH
 

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

Back
Top