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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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
Back
Top