How to set a cell value based on "OR" function?

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

Guest

I need to caluclate the value of C1 depending on sexe (M or F)
A1 = M or F
B1 = 40
If A1=M then C1=B1+10, Or IF A1=F then C1=B1+5
How do i get this in one formula?
Each seperate formula for M and F works fine, however when combining both
the system returns TRUE in C1 i.s.o. a calucalated value
Thanks in advance,
Ron
 
Hi Ron,

=IF(A1="M",B1+10,B1+15)

or, to check for something not F or M:

=IF(A1="m",B1+10,IF(A1="F",B1+15,"ERROR"))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I need to caluclate the value of C1 depending on sexe (M or F)
| A1 = M or F
| B1 = 40
| If A1=M then C1=B1+10, Or IF A1=F then C1=B1+5
| How do i get this in one formula?
| Each seperate formula for M and F works fine, however when combining both
| the system returns TRUE in C1 i.s.o. a calucalated value
| Thanks in advance,
| Ron
 
Of course the 15 should have been 5 in both cases

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi Ron,
|
| =IF(A1="M",B1+10,B1+15)
|
| or, to check for something not F or M:
|
| =IF(A1="m",B1+10,IF(A1="F",B1+15,"ERROR"))
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
||I need to caluclate the value of C1 depending on sexe (M or F)
|| A1 = M or F
|| B1 = 40
|| If A1=M then C1=B1+10, Or IF A1=F then C1=B1+5
|| How do i get this in one formula?
|| Each seperate formula for M and F works fine, however when combining both
|| the system returns TRUE in C1 i.s.o. a calucalated value
|| Thanks in advance,
|| Ron
|
|
 

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

Back
Top