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.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top