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,728
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,728
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,081,770
Messages
5,361,181
Members
400,617
Latest member
barron1

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top