IF and VLOOKUP

Richard
Richard ✭✭✭✭✭
edited 12/09/19 in Formulas and Functions

Hi

Can anyone help me with these two formulas I am trying to do:

1. IF a cell with a checkbox is true, then run this VLOOKUP formula, otherwise 0.

2. IF a cell contains this text, run this VLOOKUP formula, or IF the same cell contains this text2, run this VLOOKUP formula, or IF the same cell contains this text3, run this VLOOKUP formula, etc, etc, otherwise 0.

Thanks

Cheers

Richard

Tags:

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Can you provide more details and some screenshots?

  • Richard
    Richard ✭✭✭✭✭

    Hi Paul

    I'm sorted with 1. I think.

    2. This is the formula I have for one IF and it works - =IF([Venue Space]1 = "Hall 4.0", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 15, false))

    I just need to do ORs for all these in the same cell [Venue Space]1, so depending on the text in that cell, it returns a different VLOOKUP (same referenced sheet and row, just different column - 

    =IF([Venue Space]1 = "Hall 6.0", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 16, false))

    =IF([Venue Space]1 = "Hall 8.0", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 17, false))

    =IF([Venue Space]1 = "Hall 8.1", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 18, false))

    =IF([Venue Space]1 = "Atrium", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 19, false))

    =IF([Venue Space]1 = "Walkway", VLOOKUP([Supply Code]1, {VenuePriceList - FiraGranViaBarcelona - VM Range 2}, 20, false))

    Does that make sense?

    Thanks

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    This would be a nested IF statement. Not an OR statement. Basically you would take all of those and combine them into a string using the layout below:

     

    =IF(Criteria 1, Result 1, IF(Criteria 2, Result 2, IF(Criteria 3, Result 3, IF(Criteria 4, Result 4, Otherwise Result 5))))

     

    That formula is going to get rather long, but it will work. 

     

    If you wanted to shorten it up a little bit, you could expand your table to include your Venue Space data and use an INDEX/MATCH to search.

     

     

  • Richard
    Richard ✭✭✭✭✭

    Thanks Paul, appreciated.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!