IF statements with more than one date column

F

fyrefox

I have a workbook with date and description data. I have tried multiple
formulas like this one and get #values or name...

=IF(('Master Sheet'!G4>=I$2,'Master Sheet'!G4<=J$2),'Master
Sheet'!G4,"")*IF(('Master Sheet'!I4>=I$2,'Master Sheet'!I4<=J$2),'Master
Sheet'!I4,"")

MS G-4 and MS I-4 are dates I-2 is the lower date and J-2 is the higher date.

"To make it simple I want the items due in Jan. to show up and all other
data to be blank" This information is on a second worksheet in the same
workbook.

Thanks
 
P

Pete_UK

I think you want something like this:

=IF(AND('Master Sheet'!G4>=I$2,'Master Sheet'!G4<=J$2),'Master Sheet'!
G4,IF(AND('Master Sheet'!I4>=I$2,'Master Sheet'!I4<=J$2),'Master
Sheet'!I4,""))

Hope this helps.

Pete
 
F

fyrefox

Pete_UK

We are almost there except when the items that are dated in column MS I are
coming up #REF!

I also have a question about sorting.
Will I be able to sort the Jan sheet independent of the master sheet?
 
P

Pete_UK

You will get the #REF error if the cell references do not exist - are
you sure you have typed them in correctly? Sometimes when a long
formula is broken into separate lines on the newsgroups you get
spurious line-breaks, often with a hyphen character, so check that you
do not have any of these. The only spaces in the formula occur between
"Master" and "Sheet", so check that you have not introduced any other
spaces at the end of the lines. Also, check that the sheet is actually
named "Master Sheet", with no leading or trailing spaces.

I'm still not exactly sure what you want to do, and I'm not sure what
you want to sort - let's fix the formula first (presumably you want to
copy it down), and then we can see what happens. I think you will need
a different approach if you want the data to be automatically sorted.

Hope this helps.

Pete
 
F

fyrefox

Pete_UK

The formula works great!! I set it to an array and it fixed the problem.

Thanks for your help!!!!
 
P

Pete_UK

You're welcome - thanks for feeding back.

Pete

Pete_UK

The formula works great!! I set it to an array and it fixed the problem.

Thanks for your help!!!!







- Show quoted text -
 

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