View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default incrementing with blank cells in between

Hi!

Enter this formula in B1 and copy down as needed:

=IF(A1="","",COUNTA(A$1:A1))

If you want the leading zero you'll have to format specifically for that.

Select the range of cells where this formula will be entered.
Goto FormatCellsNumber tabCustom
In the little box under TYPE, enter: 0#
OK

Biff

"alexmace" wrote in
message ...

I have data in column A at random intervals. I'd like to auto-increment
a number in Column B only if data appears in column A in the same row.

So:

__ A | B
1 aa | 01
2
3 bb | 02
4 cc | 03
5
6
7
8 dd | 04
9
10


etc

Then, if data were added to any row in column A, the numbers in B would
all update.

Anyone have a simple solution?


--
alexmace
------------------------------------------------------------------------
alexmace's Profile:
http://www.excelforum.com/member.php...o&userid=32325
View this thread: http://www.excelforum.com/showthread...hreadid=520831