IF Formula not working when looking at two columns

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"


From_DateTo_DateSale_DateProcessed_DateTest_Column_ETest_Column_FTest_Column_G
1/01/2018

<tbody>
</tbody>
30/01/2018

<tbody>
</tbody>
2/01/2018

<tbody>
</tbody>
2/01/2018

<tbody>
</tbody>

<tbody>
</tbody>

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:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,136,338
Messages
5,675,187
Members
419,553
Latest member
hanahass

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