#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default logical test

Stumped on this one... is it possible to have more than one logical test
using the "IF" function? My example:

C9 is a drop down that includes months (i.e. Jul, Mid-Jul, End-Jul). I need
to calculate all the July's, not just "Jul".

This is what I need, but I don't know how to setup it up.
IF C9 = "Jul" or "Mid-Jul" or "End-Jul", 40*E9, 0

Many thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default logical test

You can use the AND and OR functions. Try this:

=IF(OR(C9={"jul","mid-jul","end-jul"}),40*E9,0)

HTH,
Elkar


"LisaD" wrote:

Stumped on this one... is it possible to have more than one logical test
using the "IF" function? My example:

C9 is a drop down that includes months (i.e. Jul, Mid-Jul, End-Jul). I need
to calculate all the July's, not just "Jul".

This is what I need, but I don't know how to setup it up.
IF C9 = "Jul" or "Mid-Jul" or "End-Jul", 40*E9, 0

Many thanks!!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default logical test

You can also use =IF(C9=mid-jul, 40*E9,0)+IF(C9=End-Jul, 40*E9,0)+IF(etc. etc.

this will basically take the 3 IF statements, complete the math, and add
together the results.

"LisaD" wrote:

Stumped on this one... is it possible to have more than one logical test
using the "IF" function? My example:

C9 is a drop down that includes months (i.e. Jul, Mid-Jul, End-Jul). I need
to calculate all the July's, not just "Jul".

This is what I need, but I don't know how to setup it up.
IF C9 = "Jul" or "Mid-Jul" or "End-Jul", 40*E9, 0

Many thanks!!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default logical test

Thank you for your quick reply... most helpful!!

"Elkar" wrote:

You can use the AND and OR functions. Try this:

=IF(OR(C9={"jul","mid-jul","end-jul"}),40*E9,0)

HTH,
Elkar


"LisaD" wrote:

Stumped on this one... is it possible to have more than one logical test
using the "IF" function? My example:

C9 is a drop down that includes months (i.e. Jul, Mid-Jul, End-Jul). I need
to calculate all the July's, not just "Jul".

This is what I need, but I don't know how to setup it up.
IF C9 = "Jul" or "Mid-Jul" or "End-Jul", 40*E9, 0

Many thanks!!

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
A logical test in the If function for blank, i.e., If blank? egii Excel Worksheet Functions 5 September 16th 09 11:46 AM
Follow-up to Logical Test Question Lance Excel Worksheet Functions 11 March 17th 06 08:14 PM
=IF logical test to search only part of a cell Robbie in Houston Excel Worksheet Functions 2 March 5th 05 05:09 AM
Logical test Sooraj Excel Discussion (Misc queries) 2 January 25th 05 12:59 PM
logical test - within a range esslingerdav Excel Worksheet Functions 4 November 17th 04 03:13 PM


All times are GMT +1. The time now is 07:40 AM.

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"