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,082,276
Messages
5,364,196
Members
400,786
Latest member
ismi88

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top