mcarthur2086
New Member
- Joined
- May 12, 2016
- Messages
- 15
<b2),"no","yes") which="" seems="" to="" work="" fine
<b2),"no","yes") and="" it="" seems="" to="" be="" ok,="" but="" im="" open="" criticism.
<b2),"no","yes") which="" seems="" to="" be="" ok
Hello.
I'm in the process of creating a tool that searches between two dates for one of my reports, and have been using some IF formulas to assist. I seem to be having a problem when i have to check against two columns instead of just one.
For example - see below
Data Column A is From_Date
Data Column B is To_Date
Data Column C is Sale_Date
Data Column D is Processed_Date
Test Column E asks if Sale_Date & Processed_Date fall within From_Date and To_Date and if they do, Return "YES". If either/or both do not then answer "NO"
Test Column F asks if Sale_Date DOES fall into From_Date and To_Date range BUT Processed_Date DOES NOT. If true then answer "YES" if not true then answer "NO"
Test Column G asks if Sale_Date DOES NOT fall in From_Date to To_Date range. If it DOES NOT then answer "YES" or if it DOES answer "NO"
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]From_Date[/TD]
[TD="align: center"]To_Date[/TD]
[TD="align: center"]Sale_Date[/TD]
[TD="align: center"]Processed_Date[/TD]
[TD="align: center"]Test_Column_E[/TD]
[TD="align: center"]Test_Column_F[/TD]
[TD="align: center"]Test_Column_G[/TD]
[/TR]
[TR]
[TD]
[TD][TABLE="width: 104"]
<tbody>[TR]
[TD="class: xl119, width: 104, align: center"]30/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 150"]
<tbody>[TR]
[TD="class: xl119, width: 150, align: center"]2/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 152"]
<tbody>[TR]
[TD="class: xl119, width: 152, align: center"]2/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
For Test Column E - I created IF(AND(C2,D2>=A2,C2,D2<=B2),"YES","NO"), which looks like it works, however it actually seems to only be referencing Column D and wont change the result when i alter the dates in Column C.
For Test Column F - I've tried multiple ways to get this to work, with no luck - with some reading, i think i should be looking at nesting two IF statements but not 100% sure.
For Test Column G - I created <b2),"no","yes") which="" seems="" to="" work="" fine
IF(AND(C2>A2,C2<B2),"NO","YES") which seems to be ok
If anyone could offer guidance on Test Column E and Test Column F, it would be greatly appreciated.
James.</b2),"no","yes")>
</b2),"no","yes")></b2),"no","yes")></b2),"no","yes")>
<b2),"no","yes") and="" it="" seems="" to="" be="" ok,="" but="" im="" open="" criticism.
<b2),"no","yes") which="" seems="" to="" be="" ok
Hello.
I'm in the process of creating a tool that searches between two dates for one of my reports, and have been using some IF formulas to assist. I seem to be having a problem when i have to check against two columns instead of just one.
For example - see below
Data Column A is From_Date
Data Column B is To_Date
Data Column C is Sale_Date
Data Column D is Processed_Date
Test Column E asks if Sale_Date & Processed_Date fall within From_Date and To_Date and if they do, Return "YES". If either/or both do not then answer "NO"
Test Column F asks if Sale_Date DOES fall into From_Date and To_Date range BUT Processed_Date DOES NOT. If true then answer "YES" if not true then answer "NO"
Test Column G asks if Sale_Date DOES NOT fall in From_Date to To_Date range. If it DOES NOT then answer "YES" or if it DOES answer "NO"
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]From_Date[/TD]
[TD="align: center"]To_Date[/TD]
[TD="align: center"]Sale_Date[/TD]
[TD="align: center"]Processed_Date[/TD]
[TD="align: center"]Test_Column_E[/TD]
[TD="align: center"]Test_Column_F[/TD]
[TD="align: center"]Test_Column_G[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 104"]
<tbody>[TR]
[TD="class: xl119, width: 104"]1/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]<tbody>[TR]
[TD="class: xl119, width: 104"]1/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[TD][TABLE="width: 104"]
<tbody>[TR]
[TD="class: xl119, width: 104, align: center"]30/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 150"]
<tbody>[TR]
[TD="class: xl119, width: 150, align: center"]2/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 152"]
<tbody>[TR]
[TD="class: xl119, width: 152, align: center"]2/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
For Test Column E - I created IF(AND(C2,D2>=A2,C2,D2<=B2),"YES","NO"), which looks like it works, however it actually seems to only be referencing Column D and wont change the result when i alter the dates in Column C.
For Test Column F - I've tried multiple ways to get this to work, with no luck - with some reading, i think i should be looking at nesting two IF statements but not 100% sure.
For Test Column G - I created <b2),"no","yes") which="" seems="" to="" work="" fine
IF(AND(C2>A2,C2<B2),"NO","YES") which seems to be ok
If anyone could offer guidance on Test Column E and Test Column F, it would be greatly appreciated.
James.</b2),"no","yes")>
</b2),"no","yes")></b2),"no","yes")></b2),"no","yes")>
Last edited: