# 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.

• ✭✭✭✭✭
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!

• 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!