Can I use a range name in if formula?

Closed
CS Formula - Oct 13, 2011 at 07:33 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Oct 15, 2011 at 07:58 AM
Hello,

I have a workbook with two sheets, Data and Transactions List. I have named cells A4:A7 on the second sheet as Income (Dividend, Interest, Cash, Tax).

I would like a formula in column F of the Data sheet that leaves it blank unless column C contains one of the entries in the Income range, in which case it should be the column J value.

I've tried
=IF(C384=Income,J384,"")
but it returns #Value!

Can anyone help?
Many Thanks


Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Oct 13, 2011 at 10:21 AM
Hi CS Formula,

You can't compare a single cell to a range when using IF formula.

Try this: =IF(OR(C384=A4,C384=A5,C384=A6,C384=A7),J384,"")

Best regards,
Trowa
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 15, 2011 at 07:58 AM
One alternate method would be to use COUNTIF
=IF(COUNTIF(A4:a47,"Income")>0,J384,"")
0