Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

I want to return a value in another sheet if both criteria on my my sheet is met. Using Vlookup

=VLOOKUP(AND(Transporter@row, {PRODUCER COSTS Range 5}, (VLOOKUP(Week@row, {PRODUCER COSTS Range 5})), 7), false)

This is my lookup data ON PRODUCER COSTS SHEET

Transporter Week Rate per Plt

VDV 9 516.00

HFR 9 595.00

VDV 10 525.00

HFR 10 605.00

FOR EVERY WEEK OF THE YEAR.

Answers

  • ✭✭✭✭✭
    edited 03/21/24

    Hi @Zelda CARZELRD , Unfortunately you cannot put two conditions into a VLOOKUP like that. Instead, you'll want to look into COLLECT() which allows you to grab the values for every row that meets your two criteria. COLLECT returns a range of values, even if there is only one value in that range. So, you'll also need to tell SS which value to return using the INDEX() function. In your case, I'm assuming you'll only have one value that meets the criteria so you can use INDEX to return the 1st (and only) one returned. It would look something like:

    =INDEX(COLLECT({Column of the data you want returned from PRODUCER COSTS}, {Column of TRANSPORTERS from PRODUCER COSTS}, Transporter@row, {Column of WEEKS from PRODUCER COSTS}, Weeks@row),1)

    Hope this helps.

    Be well!

    If my response was helpful or answered your question please be sure to upvote it, mark it asawesome, or mark it as the accepted answer!

  • YES Thank you This worked perfectly. I event used it with IF Transporter ISBLANK. I understand all except for the 1 before the last bracket .

    This is my final forumla :

    =IF(ISBLANK(Transporter@row), 0, INDEX(COLLECT({PRODUCER COSTS Range 6}, {PRODUCER COSTS Range 2}, Transporter@row, {PRODUCER COSTS Range 5}, Week@row), 1)) / [Standard Plt Size]@row

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2