Forum Discussion

Alecs's avatar
Alecs
Brass Contributor
May 27, 2022
Solved

Change cell reference formula row based on input

Hello guys, I'm working on a spreadsheet and try to figure out how to do the following: TABLE1 is where I introduce the price in column A, and in the next 5 columns I have different IF functions th...
  • OliverScheurich's avatar
    May 27, 2022

    Alecs 

    =IF(A3>50,A3/$J$3,IF(A3>100,A3/$L$3,0))

    What is the intended result in column B if the value in column A is greater 100? The above formula returns the result of A3/$J$3 for all values in column A which are greater 50. I suppose you want to return the result of A3/$L$3 if A3 is e.g. 250 and changed the formula:

    =IF(A3>100,A3/$L$3,IF(A3>50,A3/$J$3,0))

     

    In order to select the row from Table2 i used INDEX and MATCH with your formulas for example the formula in column B is:

    =IF(A3>100,A3/INDEX($L$3:$L$31,MATCH(G3,$I$3:$I$31,0)),IF(A3>50,A3/INDEX($J$3:$J$31,MATCH(G3,$I$3:$I$31,0)),0))

     

Resources