Loop or forumla that adds

manthony

New Member
Joined
Dec 5, 2016
Messages
40
Hi, my apologies I do not have any code to share, but my problem is I need a loop or a formula that adds +1 from the cell above it and runs as long as a number (from a formula in cell A11).

In cell A11 I have a formula that counts the number of records on a different spreadsheet. In cell B11 I have an account number from a Vlookup. I would like to take the number in B11 and add 1 to it (for example if B11 is 2100 then B12 would be 2101, and B13 would be 2102, etc). I would like for this formula to run as long as the number in cell A11. For example if A11 is 4 and B11 is 2100 then it will add down three more times so B12 is 2101, B13 is 2102, B14 is 2103.

Thank you in advance for the help.
 

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
4,790
Office Version
2013
Platform
Windows
manthony,

Try formula in B12 and copy down as far as you may need.

Code:
  =IF(ROWS(B$12:B12)<=$A$11,$B$11+ROWS(B$12:B12),"")
Hope that helps.
 

NotoriousPopol

Board Regular
Joined
Jun 28, 2016
Messages
192
Something like "=IF(B11-$B$11<$A$11, B11+1, "")" could do the work! You put this formula in B12 then extend it to the right.
 

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
4,790
Office Version
2013
Platform
Windows
Not a according to the OPs description.
I do beg your pardon ! My miss read.

So my formula would need to be =IF(ROWS(B$12:B12)<$A$11,$B$11+ROWS(B$12:B12),"")
 

manthony

New Member
Joined
Dec 5, 2016
Messages
40
Hi, thank you so much this formula is perfect, exactly what I needed. Thank you :)
 

Forum statistics

Threads
1,085,375
Messages
5,383,278
Members
401,821
Latest member
gb199

Some videos you may like

This Week's Hot Topics

Top