How to make a cell recognize multiple text strings?

T

Tourcat

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,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.75,IF(E10:I10="V",7.75,IF(E10:I10="PR",7.75,0)))))))

Any help is welcomed. Thanks.
 
B

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top