Nested If Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Column A has dates.
Cell H3 is a start date. Cell I3 is an end date.
I want to display Y in Column J if the date in Column A lies between the two
dates in H3-I3.
I'm using this formula, but get a Y even when the date in Column A is
outside the date range.

=IF(AND(A7>=H3,A7<=I3),"Y","N")
H3 = 09-01-06
I3 = 09-04-06
Still displays Y when date is 9-5-06 or above.

Need help!
 
I plugged your data and formula into a worksheet using the very same cells
and it works just fine for me. Double-check the format of the 3 cells (A7,
H3, I3) and make sure they are all formatted as Date. Might be that one or
more is formatted as text and isn't being handled properly.

Only thing - note that you're comparing dates in H3 and I3 to a date down in
A7, 4 rows down. If you meant to compare to date on same row, then change A7
in your formula to A3??
 
When you find the culprit, smack him right on the knuckles!

Glad you found the source of the problem.
 

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

Back
Top