IF Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a result that if a certain cell contains one of two different names then I need to subtract two different cells

Here is the formula I have now

=IF(S4="Broeder",M4-H4,"ER"

I also want it to have the same results if S4 = King. There will be numerous other names but these are the only two that I am looking for. This sheet will have approximately 2500 lines that I will need this formula in

Thanks for any help.

Denise
 
Hi Denise!

Use the OR function:
=IF(OR(S4="Broeder",S4="King"),M4-H4,"ER")


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Denise said:
I am trying to get a result that if a certain cell contains one of
two different names then I need to subtract two different cells.
Here is the formula I have now:

=IF(S4="Broeder",M4-H4,"ER")

I also want it to have the same results if S4 = King. There will be
numerous other names but these are the only two that I am looking for.
This sheet will have approximately 2500 lines that I will need this
formula in.
 
Hi Denise,

=IF(OR(S4="Broeder",S="King"),M4-H4,"ER")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Denise said:
I am trying to get a result that if a certain cell contains one of two
different names then I need to subtract two different cells.
Here is the formula I have now:

=IF(S4="Broeder",M4-H4,"ER")

I also want it to have the same results if S4 = King. There will be
numerous other names but these are the only two that I am looking for. This
sheet will have approximately 2500 lines that I will need this formula in.
 
Back
Top