Can I use a range name in if formula?

Closed
CS Formula - 13 Oct 2011 à 07:33
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 15 Oct 2011 à 07:58
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


1 response

TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
13 Oct 2011 à 10:21
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
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
15 Oct 2011 à 07:58
One alternate method would be to use COUNTIF
=IF(COUNTIF(A4:a47,"Income")>0,J384,"")