PDA

View Full Version : Another Excel Question


Nuttapper
03-26-2004, 12:24 PM
Hi Guys anyone assist me with this please.
Office Xp (excel)

I have a column (say A1 to A256) full of dates in this format 15/03/2004

what I want to be able to do is get excel to tell me which dates are older than 4 weeks, and return a comment in the cell, like "overdue"

I've read up on the "if" function, but wondered if it could be used as a single command for a cell range rather than each cell at a time.

I would also want the command to grow with the spread sheet, so when I got to cell say, A300 the command would still be working with the current cell (A300)and still with cell A1

The above is =IF(TODAY()-A2<28, "Okay","oVerdue") Big thanks to hood1971 from the cdrom forum (not sure if he's on here?)

Next problem :)

Column A contains variable details that all have different sell by dates, so
A1 may have a sell by date of 2 days (term is fruit)

A2 has a sell by date of 7 days (term is bread)

A3 has a sell by date of 28 days (term is frozen)

A4 may be 28 days again (term is frozen)

I need to be able to apply the formula, so that it can be applied to a single column "G" for the results "oVerdue" "Ok"

Im not sure how to do this as the results may be different for each row 2 days 7 days and 28 days.

what I want to say is:

If column A = bread >7days, or fruit >2days, or frozen>28 days, return "oVerdue" in column "G" If not return "oKay"

Thanks
Nuttapper

Virgin San
03-26-2004, 08:29 PM
Here you go mate, I'm told I need to be more helpful so ...

If in cell A3 you have your term (eg fruit, bread, frozen), and in cell B3 you have your date, then in cell C3 put this:

=IF(A3="fruit",IF(TODAY()-B3<=2,"OK","Overdue"),IF(A3="bread",IF(TODAY()-B3<=7,"OK","Overdue"),IF(A3="frozen",IF(TODAY()-B3<=28,"OK","Overdue"))))

And just drag it down the worksheet to apply to later rows. Amend column values to suit!

If this isn't clear post up your email address and I can send you the file.

HTH

Nuttapper
03-27-2004, 04:57 AM
Thats fantastic Virgin San,thankyou very much.. everyones help comes in different guises, its just picking an idea or a path out of the text or comments, sometimes people just ask the wrong questions, or ask a question that doesn't have a right or wrong answer.... I saw the thread your refering to ;)

Virgin San
03-28-2004, 12:34 AM
No problem m8 :t_up: