My first VLookup

Hello, and thank you in advance for your help. I am having trouble displaying data using a VLOOKUP function (I have never used one).


My formula reads as follows:

=VLOOKUP(Predecessor@row, {PPPredTask}, {%Complete}, true)

Its goal is the following:

Based on the value in the Predecessor Column in my sheet, I would like to search the task name column in a different sheet (as defined as {PPPredTask}), and display a value from the same sheet as PPPredTask. as defined by {%Complete).

All column types are identical, but I receive an Invalid Data Type error. One variable that I am unsure if is key or not is that both the Predecessor@row and {PPPredTask} columns are the primary columns in their respective sheets.

Any help is really appreciated!

Adam

Tags:

Best Answers

  • Jenna Bailey
    Jenna Bailey ✭✭✭✭✭
    edited 12/04/20 Answer ✓

    Sorry, I should've also see that there is an error overall in your formula.

    Where you have the {%Complete} should actually be the column reference. So if that column is column #5, the formula shhould look like

    =VLOOKUP(Predecessor@row, {PPPredTask}, 5, false)

    the {PPPredTask} should also be the whole range that you are looking up so if what you want to match is in column 1 and what you want returned is in column 5 then you should highlight column 1 to 5 and it would come back something like {PPPredTask Range 1}

    [ vlookup(what you are looking up, lookup range with column that you want returned, COLUMN #, FALSE(orTRUE)]

  • Adam Rosenzweig
    Answer ✓

    Jenna,

    You solved my problem! You are my hero!

    Thank you and have a great weekend,

    Adam

Answers

  • Jenna Bailey
    Jenna Bailey ✭✭✭✭✭

    Change the true to false

  • I actually tried that, to no avail. But thank you Jenna!

  • Jenna Bailey
    Jenna Bailey ✭✭✭✭✭
    edited 12/04/20 Answer ✓

    Sorry, I should've also see that there is an error overall in your formula.

    Where you have the {%Complete} should actually be the column reference. So if that column is column #5, the formula shhould look like

    =VLOOKUP(Predecessor@row, {PPPredTask}, 5, false)

    the {PPPredTask} should also be the whole range that you are looking up so if what you want to match is in column 1 and what you want returned is in column 5 then you should highlight column 1 to 5 and it would come back something like {PPPredTask Range 1}

    [ vlookup(what you are looking up, lookup range with column that you want returned, COLUMN #, FALSE(orTRUE)]

  • Adam Rosenzweig
    Answer ✓

    Jenna,

    You solved my problem! You are my hero!

    Thank you and have a great weekend,

    Adam

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!