1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved Calculate difference between two dates

Discussion in 'Business Applications' started by FernJones, Jan 29, 2016.

Thread Status:
Not open for further replies.
Advertisement
  1. FernJones

    FernJones Thread Starter

    Joined:
    May 30, 2011
    Messages:
    25
    Hello,

    I'm trying to save time by creating a formula for something I do every week, and I'm stuck. I wonder if someone would be able to help me out.

    I have two columns, they each contain a date. I need a formula to subtract Col A from Col B to calculate the difference, then to assign a category to them:

    Col A Col B Difference Time Group
    12/1/2015 7/1/2016 213 6-9 months

    My time groups:
    Less than 90 W/n 3 mos
    91-180 3-6 mos
    181-270 6-9 mos
    271-360 9-12 mos
    361-450 12-15 mos
    451-540 15-18 mos
    541+ 18+ mos

    Thank you very much in advance for any help.
    Fern.
     
  2. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    60,039
    First Name:
    Chuck
    It would help if you told us what software you are working with.

    If you are using some version of Microsoft Excel, you should format columns A and B to use your desired date format. Subtracting their values will return the number of days. Using Excel's VLOOKUP function is probably the easiest way to convert the number of days to the desired group description.

    I have attached an example MS-Excel file.
     
  3. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    60,039
    First Name:
    Chuck
    Just noticed I left out one date range. Revised file attached
     

    Attached Files:

  4. FernJones

    FernJones Thread Starter

    Joined:
    May 30, 2011
    Messages:
    25
    Hi.
    Sorry, I did forget to mention that it's Excel I'm using.
    And thank you so much for the VLOOKUP idea, I didn't even think about that. Your excellent suggestion and will save me so much time every week. I really appreciate your help!
    Thanks and have a great weekend!
    Fern.
     
    cwwozniak likes this.
  5. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    60,039
    First Name:
    Chuck
    You're welcome, Fern. (y)
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Calculate difference between
  1. FernJones
    Replies:
    2
    Views:
    188
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1165149

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice