Hi,
It's hard to explain what I want to achieve so I apologise if I confuse you here. I've included a sample excel (attached) and highlighted what I want to achieve in red.
I have a set of data in excel and I want to insert a new column A to contain a numeric index but I would like the numbers to repeat if that row contains any values, otherwise, if the row is completely empty, then that row index is blank or has a symbol/zero (doesn't matter). The next row containing values, the index would then contain the next number.
That was terrible, sorry. Here's another example of what i'm trying to achieve:
A B C D
1 word word
1 word word
1 word
1 word
1 word
*
2 word word
2 word word
2 word
2 word
2 word
*
3 word word
3 word word
3 word
3 word
3 word
Hope that helps.
Thanks!
Last edited by tiggi; 01-28-2012 at 03:30 AM.
Try this in A5
Drag/Fill Down=IF(COUNTA(B5:F5)=0,"",MAX($A$4:$A4)+1)
Is that what you need?
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Wow! I can't get enough of this site! Thanks so much for the speedy response - you're formula is soooo close but not quite. Refer to the attachment, this is what I'm after. Thanks again!!
Okay.
In A4
Then in A51
Drag/Fill Down=IF(AND(A4<>"",COUNTA(B5:G5)>0),MAX($A$4:$A4),IF(AND(A4="",COUNTA(B5:G5)>0),MAX($A$4:$A4)+1,""))
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
in a4 assuming single blanks are only between sets in col g
=IF(G4="","",1+COUNTIF($G$4:G4,""))
Last edited by martindwilson; 01-28-2012 at 08:19 AM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
@Martin Neat!
@ tiggi
If you only have one seperating blank row between groups, go with Martin.
My offering will work if there can be, or are, more than one seperating blank rows between groups.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks