ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to make a cell recognize multiple text strings? (https://www.excelbanter.com/excel-worksheet-functions/12174-how-make-cell-recognize-multiple-text-strings.html)

Tourcat

How to make a cell recognize multiple text strings?
 
Because a cell can only have 7 "IF" statements, is there a way to
combine multiple text strings into one "IF" statement?

Here is what I have for cell H24:
=IF(E10="LA",7.75,IF(E10="PD",7.75,IF(E10="EA",7.7 5,IF(E10="PDX",7.75,IF(E10="MC",7.75,IF(E10="V",7. 75,IF(E10="PR",7.75,0)))))))

The problem is that I need to have the same criteria for cells E10:I10
in the same cell H24. I have tried this but it doesn't work:
=IF(E10:I10="LA",7.75,IF(E10:I10="PD",7.75,IF(E10: I10="EA",IF(E10:I10="PDX",7.75,IF(E10:I10="MC",7.7 5,IF(E10:I10="V",7.75,IF(E10:I10="PR",7.75,0)))))) )

Any help is welcomed. Thanks.


Biff

Hi!

You can reduce your formula to a single IF:

=IF(OR(E10={"la","pd","ea","pdx","mc"}),7.75,0)

OR make a list of the text strings in say H1:H5:

Entered as an array with the key combo of CTRL,SHIFT,ENTER:

=IF(OR(E10=H1:H5),7.75,0)

OR, also an array:

=IF(OR(E10:I10=H1:H5),7.75,0)

Biff

-----Original Message-----
Because a cell can only have 7 "IF" statements, is there

a way to
combine multiple text strings into one "IF" statement?

Here is what I have for cell H24:
=IF(E10="LA",7.75,IF(E10="PD",7.75,IF(E10="EA",7. 75,IF

(E10="PDX",7.75,IF(E10="MC",7.75,IF(E10="V",7.75,I F
(E10="PR",7.75,0)))))))

The problem is that I need to have the same criteria for

cells E10:I10
in the same cell H24. I have tried this but it doesn't

work:
=IF(E10:I10="LA",7.75,IF(E10:I10="PD",7.75,IF

(E10:I10="EA",IF(E10:I10="PDX",7.75,IF(E10:I10="MC ",7.75,IF
(E10:I10="V",7.75,IF(E10:I10="PR",7.75,0)))))))

Any help is welcomed. Thanks.

.



All times are GMT +1. The time now is 08:11 PM.

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