Home > Back-end >  How do I increment an Excel formula but with a condition?
How do I increment an Excel formula but with a condition?

Time:03-10

My excel formula is

=LOOKUP(G10,A1:A50,B1:B50)

What I like to do is increment G10, but not the next formula.

=LOOKUP(G11,A1:A50,B1:B50)
=LOOKUP(G12,A1:A50,B1:B50)
=LOOKUP(G13,A1:A50,B1:B50)

and so on.

CodePudding user response:

try:

=ARRAYFORMULA(LOOKUP(G10:G13, A1:A50, B1:B50))

or:

=ARRAYFORMULA(LOOKUP(G10:G, A1:A50, B1:B50))

CodePudding user response:

You have to use an absolute reference. so what you need is this: =LOOKUP(G10,$A$1:$A$50,$B$1:$B$50)

For more information about absolute you can read here: https://support.microsoft.com/en-us/office/overview-of-formulas-in-excel-ecfdc708-9162-49e8-b993-c311f47ca173

  • Related