+ Reply to Thread
Results 1 to 7 of 7

How to use functions for calculating dates of other cells

  1. #1
    Registered User
    Join Date
    05-14-2011
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    3

    How to use functions for calculating dates of other cells

    Ok so the formula I am trying to write, I hope it's possible.

    So in cell A1. I have a received date that is entered, like a date a file was received.. Then in B1 if a date is not entered in that cell within 8 business days of the date in cell A1, then B1 will turn red and there will be a -1 (on the 9th date), -2 (on the 10th business day). So essentially B1 if no date is entered and it has exceeded 8 business days from the A1 date, there will be a negative number for how many business days it is over 8 days.

    I hope that makes sense. If I need to create multiple cells to achieve this let me know.


    Thanks!
    Last edited by TooNisExcelled; 05-14-2011 at 10:58 PM.

  2. #2
    Registered User
    Join Date
    05-13-2011
    Location
    New Zealander in London
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: How to use functions for calculating dates of other cells

    Quote Originally Posted by TooNisExcelled View Post
    Ok so the formula I am trying to write, I hope it's possible.

    So in cell A1. I have a received date that is entered, like a date a file was received.. Then in B1 if a date is not entered in that cell within 8 business days of the date in cell A1, then B1 will turn red and there will be a -1 (on the 9th date), -2 (on the 10th business day). So essentially B1 if no date is entered and it has exceeded 8 business days from the A1 date, there will be a negative number for how many business days it is over 8 days.

    I hope that makes sense. If I need to create multiple cells to achieve this let me know.


    Thanks!
    I think I've got this. In cell B1 I put in the formula:
    Please Login or Register  to view this content.
    ...and formatted it as a number (no decimal places)
    on cell B1 I also used Conditional formatting where I selected "Use formula to determine which cells to format" and entered the formula:
    Please Login or Register  to view this content.
    ...and gave it the format of a red fill

    With these settings, if the date entered in A1 is before today plus 8 days (i.e. for every day that passes, the negative number will increase), it will result in a negative number, and the conditional formatting will turn it red.
    Last edited by tarquinious; 05-16-2011 at 09:10 AM. Reason: fixed formula

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How to use functions for calculating dates of other cells

    Quote Originally Posted by TooNisExcelled View Post
    Then in B1 if a date is not entered in that cell within 8 business days of the date in cell A1, then B1 will turn red and there will be a -1 (on the 9th date), -2 (on the 10th business day). So essentially B1 if no date is entered and it has exceeded 8 business days from the A1 date, there will be a negative number for how many business days it is over 8 days.
    So you are saying that if no date is entered in B1 within 8 working days of A1, B1 should turn red and indicate -1,-2, etc..

    To fulfill these requirements you will need to use VBA. You cannot enter And a date AND a formula in the same cell

    Tarquinious : NOW() gives the date AND time. OP wishes only days so you would have to use TODAY() - when calculating working days you would need the NETWORKDAYS function

    This being said, I hope some VBA man can have a look at the problem

  4. #4
    Registered User
    Join Date
    05-13-2011
    Location
    New Zealander in London
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: How to use functions for calculating dates of other cells

    Quote Originally Posted by arthurbr View Post
    NOW() gives the date AND time. OP wishes only days so you would have to use TODAY() - when calculating working days you would need the NETWORKDAYS function
    A very good point. To get around the time issue, I used INT() to chop it out.

  5. #5
    Registered User
    Join Date
    05-14-2011
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How to use functions for calculating dates of other cells

    Quote Originally Posted by tarquinious View Post
    I think I've got this. In cell B1 I put in the formula:
    Please Login or Register  to view this content.
    ...and formatted it as a number (no decimal places)
    on cell B1 I also used Conditional formatting where I selected "Use formula to determine which cells to format" and entered the formula:
    Please Login or Register  to view this content.
    ...and gave it the format of a red fill

    With these settings, if the date entered in A1 is before today plus 8 days (i.e. for every day that passes, the negative number will increase), it will result in a negative number, and the conditional formatting will turn it red.

    Thanks alot for your help. Just wondering is this achievable using google documents version of excel based spread sheets?? I am trying to make this a shared spread sheet.

    Again thanks.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to use functions for calculating dates of other cells

    I am not sure that the Google Docs spreadsheet allows you to conditionally format using formulas or even format based on other cells... I could be wrong...

    The formulas in the sheet itself should be compatible.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Registered User
    Join Date
    05-14-2011
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How to use functions for calculating dates of other cells

    I tried this in Google Documents and it doesn't seem to work. It took and April date and I used 8 workdays and it took me to Dec. Seems like it took 8 and maybe used months.

    Any ideas.

+ 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