+ Reply to Thread
Results 1 to 8 of 8

Correcting my IF with AND function formula

Hybrid View

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Smile Correcting my IF with AND function formula

    Please could you correct my formula. The description is:
    If cell A1 is not blank and cell C is blank, calculate today's date minus the date in A1 (to arrive at aged debt).

    I came up with a formula:

    =IF(AND(A1="","",C1=ISBLANK),TODAY()-A1)

    - but get a 'value' error message.

    I've spent hours trying to figure this out so would be really grateful for any help!

    Many thanks.

    Teresa
    Last edited by Teresa Skiba; 11-30-2012 at 08:41 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Correcting my IF with AND function formula

    =if(and(a1="",c1=isblank),"",today()-a1)

    variation...
    =IF(A1+C1=0,"",TODAY()-A1)

    in both, i may have the "" in the wrong place, adjust as needed

    the 1st formula should read,,,

    =if(and(this=something,that=something),return-this,else-return-that)
    Last edited by FDibbins; 11-30-2012 at 07:11 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Correcting my IF with AND function formula

    Thanks very much for your reply. I tried your formula but it still came up with an error message so I attach the spreadsheetI used.

    Thanks again in advance.

    Teresa
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Correcting my IF with AND function formula

    =if(and(a1<>"",c1=""),today()-a1),"")
    you cant have
    c1=isblank
    you could use
    isblank(c1)

    =if(and(a1<>"",isblank(c1)),today()-a1),"")
    Last edited by martindwilson; 11-30-2012 at 07:13 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Correcting my IF with AND function formula

    @ Martin. i think the OP wanted A1="" not A1<>"" ?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Correcting my IF with AND function formula

    @ fd
    If cell A1 is not blank and cell C is blank
    c1=isblank will always give an error its just not correct
    Teresa Skiba please read all solutions
    =IF(AND(A1<>"",C1=""),TODAY()-A1,"") gives 164

  7. #7
    Registered User
    Join Date
    11-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Correcting my IF with AND function formula

    Thanks SO MUCH! That was really bugging me. Now I can get on with my life..

    Teresa

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Correcting my IF with AND function formula

    lol ok Martin, i was looking at the formula, not the text

    @Teresa...
    we are happy to help. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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