Need Help with an IF Statement

maic15

Active Member
Joined
Nov 17, 2004
Messages
313
Hi All,

I have an IF statement that is not meeting all of my conditions. Please see the following spreadsheet:
Book1
ABCDEFG
1Paramter Values
2Start DateEnd DateWeekCondition True or False (1 Value is Returned)If Statement Works
310/31/200511/4/200510/31/05 - 11/04/05TRUEX
411/1/200511/5/200510/31/05 - 11/04/05TRUEX
510/31/200511/18/200510/31/05 - 11/04/05TRUEX
611/4/200511/15/200510/31/05 - 11/04/05FALSE
7
8Condition Begin Used
9"=IF(($E4>=DATEVALUE(LEFT($P3,FIND(" ",$P3)-1)))*($F4<=DATEVALUE(MID($P3,FIND("-",$P3)+2,LEN($P3)))),1,0)
Sheet1


I need to add another condition to capture make the statement that says False = True.
Thoughts?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

colbymack

Active Member
Joined
Jul 14, 2005
Messages
333
Maic15,
Can you provide the value that is stored in cell $P3, as referenced by your formula?

Also, can you indicate which cell the condition resides in (i.e. you have it displayed in A9, but I am guessing it is in either column F or G - can you also indicate which row.

Last, I assume you are trying to get a different value for the cell marked in red. Is that correct? If so, what value would you like to see?

Thanks,
Colbymack
 

colbymack

Active Member
Joined
Jul 14, 2005
Messages
333
Thanks for the added info. Just to clarify, in your example formula, you are comparing E4 to E3 (the first portion of the date), and comparing F4 to the second portion of E3.

This is confusing to me (forgive my ignorance) because the value in E4 is equal to the value in E3 in your example (they are both the date range of 10/31/05 - 11/04/05), which also means that P3 is equal to these. Additionally, F4 has a value of True or False being displayed, and not a date for you to use in comparison, as is being indicated in your sample formula:

"=IF(($E4>=DATEVALUE(LEFT($P3,FIND(" ",$P3)-1)))*($F4<=DATEVALUE(MID($P3,FIND("-",$P3)+2,LEN($P3)))),1,0)

I think I understand your formula, but it doesn't appear to line up with the data that you presented above it. Am I missing something?

Also, can you please indicate which cell this formula would reside in - is it the cell marked False, or the cell marked in red?

I think I can help you better once I have that info.

Thanks,
Colbymack
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,440
Messages
5,831,643
Members
430,079
Latest member
lucasabreueng

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top