Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
alexmace
 
Posts: n/a
Default incrementing with blank cells in between


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

  #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



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default incrementing with blank cells in between

Put 1 in B1.

In B2, add

=IF(A2="","",INDEX($B$1:B1,MAX(IF($B$1:B1<"",ROW( $B$1:B1))))+1)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter, and copy down.

Format column B as 00.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking Blank Cells Karlos Excel Worksheet Functions 2 February 27th 06 12:34 PM
Replace cells with blank diggers Excel Worksheet Functions 1 November 17th 05 12:23 AM
pivot tables reports - altering display of (blank) cells cak Excel Worksheet Functions 1 August 22nd 05 12:39 AM
Copy down - special to fill only the blank cells Mike Excel Discussion (Misc queries) 3 April 18th 05 10:08 PM
Non Blank - Blank Cells???? Reggie Excel Discussion (Misc queries) 3 January 12th 05 12:04 AM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"