# Formula If & AND referencing form another sheet

Is there a formula for the following scenario referencing from another sheet?

if "checkbox = ticked under Unique column" AND "Fruit = Apple" Then display [color]@row

Refer to below, result I want to get is "Green"

=IF(AND({SheetA Range 3}=1, {SheetA Range 2}=Apple), {SheetA Range 4})

I tried with above formula, but didnt work. =(

• I think I found a solution without Unique column.

=COUNT(DISTINCT(COLLECT({Sheet A Fruit}, {Sheet A Color}, ="Yellow")))

• Woot! It works! Thanks heaps!

• Happy to help! 👍️

• hi Paul

Another weird scenario.

if "checkbox = ticked under Unique column" AND "color = Yellow" Then count the number of yellow.

Refer to below, result I want to get is "3"

=INDEX(COUNTIFS({Sheet A Color}, {Sheet A Unique}, 1, {Sheet A Color}, "Yellow")

I guess adaptation formula above doesnt work. T.T

• I think I found a solution without Unique column.

=COUNT(DISTINCT(COLLECT({Sheet A Fruit}, {Sheet A Color}, ="Yellow")))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!