MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 08:41 AM   #1
dougie
 
Join Date: Mar 2004
Posts: 45
Default HELP WITH NESTED STATEMENTS

HELP.....

I have a query that requires FOUR possible answers depending on the data contained within a cell.


I have FOUR columns. The STATUS column being where i want the formula to be.

DATE ACCEPTED, DATE AUTHORISED, DATE RECEIVED, STATUS.

What I am trying to achieve is:

1: If DATE AUTHORISED cell is NULL after five days from DATE ACCEPTED cell, then give me a message to say "Chase Authorising Officer" once date entered into DATE AUTHORISED cell say "AUTHORISED"

Then,

2: Once DATE AUTHORISED has been entered and DATE RECEIVED cell is NULL after 5 days give a message to say "CHASE ME" once date entered into DATE RECEIVED cell say "COMPLETE".

I dont know if it can be done, but I will be extremely gratefull for the time giving in solving this nightmare for me.

Many thanks in anticipation.

Dougie
[/img][/url][/list][/code]
dougie is offline   Reply With Quote
Old Mar 30th, 2004, 08:50 AM   #2
onlyadrafter
 
Join Date: Aug 2003
Location: England
Posts: 4,584
Default Re: HELP WITH NESTED STATEMENTS

Hello,

I haven't tested this thoroughly, but it appears to work, I think.

=IF(C2<>"","COMPLETE",IF(AND(B2="",TODAY()-5>A2),"CHASE OFFICER",IF(AND(C2="",TODAY()-5>B2),"CHASE ME","AUTHORISED")))


Where the dates are in A2, B2 and C2.

Let me know if any problems/errors.
__________________
-------------------------
Hope this is helpful.
-------------------------
only a drafter,
but broadening my Excel knowledge.
onlyadrafter is offline   Reply With Quote
Old Mar 30th, 2004, 08:56 AM   #3
Zack Barresse
MrExcel MVP
 
Zack Barresse's Avatar
 
Join Date: Dec 2003
Location: Oregon, USA
Posts: 9,551
Default

how about...

=IF(C2="",IF(TODAY()>A2+5,"Chase Authorizing Officer",IF(TODAY()>B2+5,"Chase Me","AUTHORISED")),"Complete")

assuming your dates are in a2:c2 respectively.

edit: sorry drafter, didn't see ya, evidently i didn't read his earlier post here either.
__________________
Regards,
Zack Barresse

All Excel Functions
(If you would like comments in any code, please say so.)
Zack Barresse is offline   Reply With Quote
Old Mar 30th, 2004, 09:08 AM   #4
fairwinds
MrExcel MVP
 
fairwinds's Avatar
 
Join Date: May 2003
Posts: 8,445
Default Re: HELP WITH NESTED STATEMENTS

Hi,

Maybe this is an unnescesary post but I think this is how I would have wanted it to look.

=IF(B2="",IF(TODAY()-A2>5,"Chase Authorising Officer",""),"Authorised")&IF(B2="","",IF(C2="",IF(TODAY()-B2>5," / Chase Me","")," / Complete"))
__________________
"Fair Winds and Following Seas"
fairwinds is offline   Reply With Quote
Old Mar 30th, 2004, 10:08 AM   #5
Ekim
 
Join Date: Jul 2002
Location: Perth, Australia
Posts: 1,416
Default Re: HELP WITH NESTED STATEMENTS

Fairwinds,

Nice formula. I would amend it slightly to show a blank in the Status column if there is no date in column A:

=IF(A2="","",IF(B2="",IF(TODAY()-A2>5,"Chase Authorising Officer",""),"Authorised")&IF(B2="","",IF(C2="",IF(TODAY()-B2>5," / Chase Me","")," / Complete")))

Also, the OP may wish to trap certain typos errors e.g. the authorization date must be greater than, or at least the same as, the acceptance date. Ditto for the received date compared to the authorization date. At the moment, any date in the Date Authorized column or the Date Received column will trigger a message in the Status column.

In cell B2:
Data menu | Validation
Allow: Date
Data: Greater than or Equal to
Start date: A2
Error Alert: “The Date Authorized must be greater than, or the same as, the Date Accepted”


Regards,

Mike
Ekim is offline   Reply With Quote
Old Mar 30th, 2004, 11:03 AM   #6
dougie
 
Join Date: Mar 2004
Posts: 45
Default Re: HELP WITH NESTED STATEMENTS

Many thanks to you all.

Fairwinds, thanks but there will always be data in column a.

OfF to test now.

cHEERS
dougie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 09:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.