+ Reply to Thread
Results 1 to 15 of 15

failing to formulate a nested If DateDif - pls help!

  1. #1
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    failing to formulate a nested If DateDif - pls help!

    Noobie here so pls be gentle! Just looking for some help pretty please, as there is no one around who can help me with this?

    I have two sheets of data (one called "Raised", one called "Responses"), both have order numbers and dates plus a bunch of other info. I'm trying to do a nested "if datedif" to work out difference in days between the two sheets but only if there is a match on the order number. so I think I worked it out like this -

    =IF(RESPONSES!$C:$C=RAISED!D28, DATEDIF(RESPONSES!A29, RAISED!B28,"d"), "")

    Column C on Responses = Order number
    Column D on Raised = Order number
    then columns B on Raised and C on Responses are the date fields (which have been formatted to short dates).

    I'm only getting "" results, even though I know there are matching order numbers (I did a separate vlookup to check that)

    Help me forum peoples!! you are my only hope!

  2. #2
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: failing to formulate a nested If DateDif - pls help!

    =(VLOOKUP(RESPONSES!A:A,RESPONSES!A:B,2)-VLOOKUP(RAISED!A:A,RAISED!!A:B,2))

    That should work. Just change the references if necessary. Tried to emulate it as best I could.Format the cell to Number. It will give you number of days.

    If you don't want it to include the referenced day then just put a -1 on the end.

  3. #3
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    Thanks Danny (I would never have worked that one out by myself! - but I just got a #VALUE! or #n/a! instead of a result?

  4. #4
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: failing to formulate a nested If DateDif - pls help!

    Can you upload a copy of the spreadsheet? Would probably be easier. Makes sure all the cell references are correct too.

    Just to go over the cell references. How can response have a date and order number in same column?
    Last edited by DannyJ; 09-16-2016 at 08:18 AM. Reason: Added detail

  5. #5
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    sure - can just explain how to upload it to the forum please? never done that before

  6. #6
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: failing to formulate a nested If DateDif - pls help!

    Click go advanced > manage attachments and then upload from there.

  7. #7
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: failing to formulate a nested If DateDif - pls help!

    I am heading out from work and won't have access to a computer for the rest of the day. To try and help you I will explain what the formula does:

    A:A references the order numbers (Change that for each sheet) - A:B references the 'table' so that will need to include both the order number and date in it. The '2' on the end is a column reference. This needs to point to the date from left to right (Example: If the range is B:D and date is in B then it will be 1. If date is in D it will be 3.

    Sorry I can't help more.

  8. #8
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    ok - I uploaded the file
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    the bit I'm working on is on "RAISED" column K.

    ahh just spotted your reply. ok - well thanks for your help danny! have a good day

  10. #10
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    Is anyone else able to assist please? I'm getting mighty frustrated here! - updated document uploaded

    thanks
    Attached Files Attached Files
    Last edited by BEX GREEN; 09-16-2016 at 09:23 AM.

  11. #11
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: failing to formulate a nested If DateDif - pls help!

    Change the cell colour where you need the end result formula to green, enter the result that you expecting, change the colour in the 1st cell of the 'lookup' columns to red.

    Then repost your workbook.

    That way someone can easily determine exactly where and what to look for and work out the formula required.

  12. #12
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    My apologies - it was perhaps a little confusing. So here's the revision.

    The aim is to match the order numbers in red on "Raised tab" with order numbers in red on "Responses tab".

    Where there is a match - what is the difference in days between orange on "Raised" and blue on "Respones" - put this result in the green column on "Raised" against the same line as the order number it matched with.

    Where there is no match - leave the green cell empty.
    Attached Files Attached Files

  13. #13
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: failing to formulate a nested If DateDif - pls help!

    A solution using INDEX MATCH which has the bonus of returning the response date, the response time, and leaves the cells blank when no match is found.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-16-2016
    Location
    BLACKBURN, ENGLAND
    MS-Off Ver
    2010
    Posts
    8

    Re: failing to formulate a nested If DateDif - pls help!

    OMG THATS BRILLIANT!

    thank you so very very much for your help!! have a fantastic weekend!

  15. #15
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: failing to formulate a nested If DateDif - pls help!

    Quote Originally Posted by BEX GREEN View Post
    OMG THATS BRILLIANT!

    thank you so very very much for your help!! have a fantastic weekend!
    Thanks for the feedback, glad it worked for you, especially seeing as I am a Burnley fan :-).

    PS. You can also use the INDEX MATCH to return the Liability values as well.
    Last edited by BlindAlley; 09-16-2016 at 01:09 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] DATEDIF - DATEDIF Calculation returning a negative for days or months
    By DaveBre in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2015, 06:22 PM
  2. [SOLVED] Formula failing only when nested
    By mwatson2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-31-2015, 05:59 PM
  3. DateDif Average? Damn DateDif
    By UTCHELP in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2012, 08:53 AM
  4. how to formulate A..B..C...AA AB AC..etc
    By xianwinwin in forum Excel General
    Replies: 4
    Last Post: 03-16-2011, 09:05 PM
  5. Don't formulate if blank. How?
    By lordFRZA in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-24-2009, 02:44 AM
  6. nested DATEDIF funtion in IF function...
    By Excel_Gent in forum Excel General
    Replies: 3
    Last Post: 11-07-2007, 04:11 PM
  7. time formulate
    By arslan in forum Excel General
    Replies: 3
    Last Post: 04-16-2006, 08:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1