# If And Formula not working

Options

My formula is not working but I also don't know that I am using the correct formula. I am trying to pull a number from a different sheet (a number from the PAC Weekly freezer reading max temp column) and want to pull that number only if it also has a match of the date from Week 1 and the freezer number

=IF(AND({PAC Weekly Freezer Readings Date} = [Week 1]@row, {PAC Weekly Freezer Number} = [Freezer/Fridge #]@row), {PAC Weekly Freezer Readings Max Temp}, "")

• ✭✭✭✭✭✭
Options

The issue with your formula is that your positive condition in you IF just gives the system a range of values, which it doesn't know what to do with in an IF. INDEX/COLLECT should work much better here:

The syntax is: =INDEX(COLLECT({Rate Value}, {Criterion 1 Range}, [Criteria 1]@row, {Criterion 2 Range}, [Criteria 2]@row), 1)

=INDEX(COLLECT({PAC Weekly Freezer Readings Max Temp}, {PAC Weekly Freezer Readings Date}, [Week 1]@row, {PAC Weekly Freezer Number}, [Freezer/Fridge #]@row), 1)

Regards,

Jeff Reisman

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• ✭✭✭✭✭✭
Options

The issue with your formula is that your positive condition in you IF just gives the system a range of values, which it doesn't know what to do with in an IF. INDEX/COLLECT should work much better here:

The syntax is: =INDEX(COLLECT({Rate Value}, {Criterion 1 Range}, [Criteria 1]@row, {Criterion 2 Range}, [Criteria 2]@row), 1)

=INDEX(COLLECT({PAC Weekly Freezer Readings Max Temp}, {PAC Weekly Freezer Readings Date}, [Week 1]@row, {PAC Weekly Freezer Number}, [Freezer/Fridge #]@row), 1)

Regards,

Jeff Reisman

If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

• Options

Thank you so much! That was so helpful.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!