ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   logical test (https://www.excelbanter.com/excel-worksheet-functions/103638-logical-test.html)

LisaD

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!!

Elkar

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!!


bclancy12

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!!


LisaD

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!!



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com