ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF - returns name error (https://www.excelbanter.com/excel-worksheet-functions/87592-if-returns-name-error.html)

Alan Davies

IF - returns name error
 
I want to use an IF statment in a spreadsheet as follows

Column I cells are Validated as Lists for input

Column K is a value that is associated with Column I

I want Column P to show me column K's value if Colmun I matches a certain
selection from the list:

When I input the statement:
=IF(I2=ABCD,K2,0) I get an error of #Name? in P2

Can anyone explian why, and help me correct this please
TIA



Ardus Petus

IF - returns name error
 
=IF(ISNUMBER(MATCH(I2,{"A";"B";"C";"D"},0)),K2,0)

HTH
--
AP

"Alan Davies" a écrit dans le message de news:
...
I want to use an IF statment in a spreadsheet as follows

Column I cells are Validated as Lists for input

Column K is a value that is associated with Column I

I want Column P to show me column K's value if Colmun I matches a certain
selection from the list:

When I input the statement:
=IF(I2=ABCD,K2,0) I get an error of #Name? in P2

Can anyone explian why, and help me correct this please
TIA





Bondi

IF - returns name error
 
Hi
Try this,

=IF(I2="ABCD",K2,0)

With text you have to inclose it in qutation marks otherwise Excel
thinks it is a name in the sheet and can't find it.

Regards,
Bondi



All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com