help with if statement

Y

Yossy

If cell A5 > C5 = then Yes, otherwise No, But before it gives Yes it should
look at date (Cell A10 and compare with cell B10) cell A10 must be with the
B10 date.

A10 = 10/17/2008

B10 = (10/1/2008 - 10/31/2008)

All help totally appreciated. Thanks
 
M

Mike H

Hi,

Are you saying you have 2 dates in B10 and you want to check that a10 is
between these dates?

If you do have 2 dates in B10 how are they arrived at because if you do have
2 dates in the cell and you have typed them then a comparison is a lot more
complicated than it need be.

Mike
 
G

Glenn

Yossy said:
If cell A5 > C5 = then Yes, otherwise No, But before it gives Yes it should
look at date (Cell A10 and compare with cell B10) cell A10 must be with the
B10 date.

A10 = 10/17/2008

B10 = (10/1/2008 - 10/31/2008)

All help totally appreciated. Thanks


=IF(AND(A5>C5,A10>=DATEVALUE(MID(B10,2,FIND("-",B10)-3)),A10<=DATEVALUE(SUBSTITUTE(MID(B10,FIND("-",B10)+2,12),")",""))),"YES","NO")
 
S

ShaneDevenshire

Hi,

The key to solving this problem is to know what you actually have in B10:

(10/1/2008 - 10/31/2008)
or
10/1/2008 - 10/31/2008

Before we get carries away, I notice that this represents October. You can
make your task easier if you enter October or Oct in cell B10 if you are
trying to indicate a whole month. Or better yet enter 10/1/2008 and format
it to show Oct-2008.

In this last case the formula would be

=if(AND(A5>C5,MONTH(A10)=MONTH(B10)),"Yes","No")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top