COLUMN D: Dropdown list of values

COLUMN E: IF function returning different values depending on COLUMN D contents


I have the functionality described above working properly. My problem is that I want the IF function in COLUMN E to return a working formula rather than a value.

Right now the IF function only returns the actual formula text rather than using the formula itself within the cell. I'm assuming that this is because the IF function can only provide values, not formulas, as outputs.


Is there a better approach or function I can use to insert a completely different, operational formula into COLUMN E depending on the value listed in COLUMN D?

Your help is appreciated.

EDIT: An example of my problem can be found on the following sheet:


  • 1
    share a copy of your sheet
    – user0
    Commented Jul 8, 2019 at 13:28
  • 1
    what is your formula?
    – user0
    Commented Jul 8, 2019 at 13:33
  • Hi, thanks for your reply. Here's an example: drive.google.com/… Columns B and C dynamically update depending on what's selected in Column A. I accomplish that by using VLOOKUP to pull data from specific columns in the data sheet. But there are multiple shipping rates, so when the "Shipping To" value is changed, I want to automatically change the adjacent formula in Column E. Using the IF function doesn't provide an operational formula -- just plaintext. I want a comparable function that actually changes the active formula.
    – headroom
    Commented Jul 8, 2019 at 15:47

1 Answer 1

  • paste in B2 cell:

    =ARRAYFORMULA(IFERROR(VLOOKUP(A2:A, data!$A:$C, {2, 3}, 0)))

  • paste in E2 cell:

     IF(LEN(data!A2:A), "♦"&data!A2:A&data!B2:B&
     IF(LEN(data!D2:G), REGEXEXTRACT(data!D1:G1, "^..")&"♠"&data!D2:G, ), ))
     ,,999^99)),,999^99)), "♦")), "♠")), 2, 0)*1))


  • spreadsheet demo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.