+ Reply to Thread
Results 1 to 9 of 9

Formula needed to count the number of days based on a date in other cells

  1. #1
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Formula needed to count the number of days based on a date in other cells

    WS attached

    I need a simple formula to count the number of days between a date entered in another cell and the current date. This number should change as days pass and ws is reopened.

    Formula goes in B2:B10
    The date inputted into A2:A10 will populate in B2:B10 and count the number of days from the date entered through whatever the current date is.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Formula needed to count the number of days based on a date in other cells

    In B2, =DATEDIF(A2,TODAY(),"d") and copy down.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Formula needed to count the number of days based on a date in other cells

    You may use this formula

    B2
    =TODAY()-A2
    and format the cell as general number.

    Regards.

  4. #4
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula needed to count the number of days based on a date in other cells

    works great thank you

  5. #5
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula needed to count the number of days based on a date in other cells

    the only problem is when I dont have a date entered it shows an error amount of 43473. Can you adjust the formula not to show error codes when no data is available?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Formula needed to count the number of days based on a date in other cells

    43473 is the date. Is the number of days since 1/1/1900. Just reformat it as a date to see in the style you wish.

  7. #7
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula needed to count the number of days based on a date in other cells

    No, the B column is where it populates the number of days from the date entered into the A column and the current date. Currently when I enter a date into A column it shows correctly the number of days in the B column. But when nothing is entered into the A column it shows 43473.

  8. #8
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Formula needed to count the number of days based on a date in other cells

    Try

    =IF(A2>0,TODAY()-A2,"")

    Regards.

  9. #9
    Forum Contributor
    Join Date
    07-06-2013
    Location
    USA
    MS-Off Ver
    MS Office 2019 Pro Plus
    Posts
    182

    Re: Formula needed to count the number of days based on a date in other cells

    got it thanks again

+ 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] Simple formula needed to count cells based on item names in other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-25-2019, 05:49 PM
  2. Replies: 16
    Last Post: 08-22-2017, 11:20 AM
  3. [SOLVED] highlight a series of cells based on the number of days in a date range
    By b2lynch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2014, 10:48 PM
  4. Replies: 8
    Last Post: 12-04-2013, 04:14 AM
  5. [SOLVED] Formula Needed to count based on entries into 2 other cells.
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2013, 08:01 PM
  6. [SOLVED] Formula Needed to count a range of cells based on criteria in 2 other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 04:06 PM
  7. How do I count the number of people needed on a project over various days?
    By seppopovich in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2013, 09:22 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