Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
C C is offline
external usenet poster
 
Posts: 61
Default Row Increment

I have a spreadsheet that has data in rows A1 through B500. For each row I
would like to add 1 to column b 1 thru 500. However, when column b = 5 then
that row value for b becomes 0 and 1 is added to column a of that row.

A B
1 0
1 1
1 2
1 3
1 4
2 0
2 1

Can someone help?

Thanks in Advance
CB
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Row Increment

Do it with two formulas

in A1 =int((Row()-1)/5)+1

in B1 put =mod(Row()-1,5)

Copy formulas down column A and b

"C" wrote:

I have a spreadsheet that has data in rows A1 through B500. For each row I
would like to add 1 to column b 1 thru 500. However, when column b = 5 then
that row value for b becomes 0 and 1 is added to column a of that row.

A B
1 0
1 1
1 2
1 3
1 4
2 0
2 1

Can someone help?

Thanks in Advance
CB

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
Increment by 18 John Excel Worksheet Functions 1 October 8th 09 02:55 AM
Increment Maria Excel Worksheet Functions 4 November 9th 07 12:10 AM
increment a value by 1 Workshops New Users to Excel 3 March 4th 06 11:06 PM
Increment/Increment letter in alphabetical order Neil Goldwasser Excel Programming 3 January 25th 06 09:07 AM
need to increment value Tom Excel Discussion (Misc queries) 5 June 24th 05 12:54 PM


All times are GMT +1. The time now is 02:44 PM.

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

About Us

"It's about Microsoft Excel"