If and formula where the criteria are dates

%3CLINGO-SUB%20id%3D%22lingo-sub-712350%22%20slang%3D%22en-US%22%3EIf%20and%20formula%20where%20the%20criteria%20are%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712350%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20a%20formula%20that%20will%20pull%20the%20value%20in%20a%20cell%20if%20date%20is%20between%202%20values%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eexample%3A%26nbsp%3B%20if%20C2%20(date)%20is%20%26gt%3B%3D%20January%201%2C%202018%20and%20also%20%26lt%3B%3D%20May%2031%2C%202018%2C%20then%20I%20need%20the%20value%2C%20but%200%20if%20not.%26nbsp%3B%20I%20tried%20%3Dif(and(C2%26gt%3B%3D01%2F01%2F2018%2CC2%26lt%3B%3D05%2F31%2F2018)%2CE2%2C0)%20but%20it%20didn't%20work.%26nbsp%3B%20do%20I%20need%20to%20convert%20the%20date%20to%20a%20number%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-712350%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

I need a formula that will pull the value in a cell if date is between 2 values

 

example:  if C2 (date) is >= January 1, 2018 and also <= May 31, 2018, then I need the value, but 0 if not.  I tried =if(and(C2>=01/01/2018,C2<=05/31/2018),E2,0) but it didn't work.  do I need to convert the date to a number?

0 Replies