Change Formula Based On Cell Value In A1

  • =SUMIF(SHIPPED!$A$3:$A$13,A2,SHIPPED!$B$3:$B$13)

    I would like for the formula to change to what is in A1.. If I change A1 to C, I would like for the formula to replace A with a C in the formula.

    SUMIF(SHIPPED!$A$3:$A$13,A2,SHIPPED!$C$3:$C$13)


    Thanks

  • Re: Change Formula Based On Cell Value In A1


    You could try changing:

    =SUMIF(SHIPPED!$A$3:$A$13,A2,SHIPPED!$B$3:$B$13)

    to:

    =SUMIF(SHIPPED!$A$3:$A$13,A2,indirect("SHIPPED!$"&a1&"$3:$"&a1&"$13")

  • Re: Change Formula Based On Cell Value In A1


    I still can't get the right answer.


    I added the last paranthese and tried to make the new address absolute, so it doesn't copy down.. but it didn't work.


    I tried to send up the file but I get a popup block. I don't know where to go to unlock it.

  • Re: Change Formula Based On Cell Value In A1


    That's funny. Brian and I must have posted within seconds of each other.


    When you said you added the last parenthesis...did you mean the last quotation mark?


    You will note a very slight difference between Brian's version and my version at the very end...the last quotation mark is needed.


    Beyond that this should work.


    Otherwise, wIthout an example of what is failing, I am not sure what to do.

  • Re: Change Formula Based On Cell Value In A1


    John, we do not say no cross posting but it is only fair to post links to other posts, to avoid members wasting ime on already solved issues.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!