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?
 

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
 

Forum statistics

Threads
1,081,523
Messages
5,359,263
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top