SOLVED

excel multiple and/or conditions with date data

%3CLINGO-SUB%20id%3D%22lingo-sub-2722092%22%20slang%3D%22en-US%22%3Eexcel%20multiple%20and%2For%20conditions%20with%20date%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2722092%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI%20am%20able%20to%20retrieve%20data%20from%20D2%20and%20E2%20but%20I%20also%20want%20to%20have%20the%20same%20data%20included%20with%20D3%20and%20E3%20also.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EIs%20it%20%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Screenshot_14.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308210i9461D7EB19D16E50%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot_14.png%22%20alt%3D%22Screenshot_14.png%22%20%2F%3E%3C%2FSPAN%3Epossible%20to%20get%20multiple%20%22date%22%20data%20from%20Excel%3F%20Example%20below%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2722092%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2722128%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20multiple%20and%2For%20conditions%20with%20date%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2722128%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1147282%22%20target%3D%22_blank%22%3E%40ardamutlu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20not%20sure%20I%20understand%20what%20you're%20trying%20to%20do%2C%20but%20perhaps%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(AND(OR(A2%26gt%3B%3D%24D%242%3BB2%26lt%3B%3D%24E%242)%3BOR(A2%26gt%3B%3D%24D%243%3BB2%26lt%3B%3D%24E%243))%3B%22true%22%3B%22false%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2722415%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20multiple%20and%2For%20conditions%20with%20date%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2722415%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3BHi!%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20have%20tried%20it%2C%20but%20It%20gave%20me%20all%20of%20the%20data%20as%20%22true%22.%3CBR%20%2F%3EFor%20example%3A%20As%20you%20can%20see%20from%20the%20image%2C%20I%20want%20the%20red%20ones%20to%20be%20%22false%22%20because%2C%20they%20are%20not%20included%20between%20(01.03.2022%2F30.04.2022%20and%2001.06.2022%2F31.08.2022).%20I%20want%20to%20have%20the%20ones%20that%20belong%20inside%20that%20two%20certain%20dates%20as%20%22true%22%20not%20all%20of%20them.%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3BI%20am%20wondering%20if%20it's%20possible%20to%20do%20such%20thing%20in%20Excel%20or%20not.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot_15.png%22%20style%3D%22width%3A%20647px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308213i33408438002B6E5A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot_15.png%22%20alt%3D%22Screenshot_15.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am able to retrieve data from D2 and E2 but I also want to have the same data included with D3 and E3 also. Is it Screenshot_14.pngpossible to get multiple "date" data from Excel? Example below:

 

 

4 Replies

@ardamutlu 

I'm not sure I understand what you're trying to do, but perhaps

 

=IF(AND(OR(A2>=$D$2;B2<=$E$2);OR(A2>=$D$3;B2<=$E$3));"true";"false")

@Hans Vogelaar Hi!


I have tried it, but It gave me all of the data as "true".
For example: As you can see from the image, I want the red ones to be "false" because, they are not included between (01.03.2022/30.04.2022 and 01.06.2022/31.08.2022). I want to have the ones that belong inside that two certain dates as "true" not all of them.
   I am wondering if it's possible to do such thing in Excel or not.

Screenshot_15.png

best response confirmed by ardamutlu (New Contributor)
Solution

@ardamutlu 

How about

 

=IF(OR(AND(A2>=$D$2;B2<=$E$2);AND(A2>=$D$3;B2<=$E$3));"true";"false")

 

@Hans Vogelaar 

 

Perfect! It works out just fine.


Thanks a lot! You are the best.