Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default How to set a cell value based on "OR" function?

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default How to set a cell value based on "OR" function?

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

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Ronnie" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default How to set a cell value based on "OR" function?

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

"Ronnie" wrote in message ...
|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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default How to set a cell value based on "OR" function?

Of course the 15 should have been 5 in both cases

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| 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
|
| "Ronnie" wrote in message ...
||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
|
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Excel "mode" function returns different results based on sort orde Mark Neuffer Excel Worksheet Functions 7 April 25th 06 08:15 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
"IF"- "THEN" type Formula based on Null value Jay Excel Worksheet Functions 8 November 17th 05 09:05 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"