+ Reply to Thread
Results 1 to 14 of 14

Expiration Date

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Expiration Date

    I am putting together a spreadsheet, and i want it to give me clearance expiration dates. Column D shows eligibility, and G shows a close date. I want it to populate the expiration date in column I. If D shows S then it needs to be ten years from the date in G. If D shows SCI then it needs to show five years from the date in G. The date format i am using is for example 23-Apr-13. I am using excell 2007. I apologize in advance if this is already covered or if i did not provide enough information. I am new, be easy on me.

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    Hello,

    You can use the DATE formula like this
    Please Login or Register  to view this content.
    Assuming D1 = SCI or S, and the date is in G1, you can paste that formula in I1
    (copy pasta from Ford)
    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

    Regards,
    Lem

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: Expiration Date

    What if D differ from "S" or "SCI"? I suppose the expiration date does not change in that case.
    Try this:
    =EDATE(G1,IF(D1="S",120,IF(D1="SCI",60,0)))
    Quang PT

  4. #4
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Expiration Date

    When i do this it populates a number at the end. Thats what is confusing me.

  5. #5
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    If you see a number, that means it's working. Please format it as "Date" format, not "Gereral", which can be done through Format --> Cells

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: Expiration Date

    try to format the cell as date.(Ctrl-1)

    Untitled.jpg

  7. #7
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Expiration Date

    Yeah, I told yall i was new. It works i greatly appreciate it. Do i have to input the formula in every row individually, or is there something i can do to make it do it for me

  8. #8
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    You can copy paste it in every row, or you can simply "drag" it - when you select the cell, there is a big dot at the lower right corner, you can simply click it, hold it and drag it down to as many cell as you want. The other way is copy paste - copy the cell with formula, select all cells you want to apply the formula, then paste it (I assume they are all in a column / row).

  9. #9
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Expiration Date

    Alright, now my boss thinks im a genius so he wants me to take it a step further. If we are a year out he wants it to populate green, if we are six months yellow, and if we are a month out red.

  10. #10
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    You can do it all with conditional format. Can you provide a small sample file?

  11. #11
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Expiration Date

    Capture.JPG

    The shaded in area is what i want to change colors

  12. #12
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    I know you wanted to change color, but I was hoping for a small sample excel file so I can put in a condition formal, and all you have to do is copy paste special that format into your file ...
    On the formula, it will only add 5 or 10 years, so of course it will be Green on everything I guess?
    by the way, you should change the "" at the end of the formula to G1, so it changes to this
    Please Login or Register  to view this content.
    In case, like bebo said, nothing is put in D1 (If nothing is put in D1, my formula will return "Blank" instead).
    Also, I suggest using his formula too, really simple and straight forward, isn't as complicated-look-alike like mine.

  13. #13
    Registered User
    Join Date
    04-23-2013
    Location
    Clarksville
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Expiration Date

    Sorry i cant give an actual file its protected information.

  14. #14
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Expiration Date

    You don't have to give the entire file, just couple of rows of examples is fine, see the attached file.
    What you can do is copy the cell, right click on the cell on your actual workbook, "paste special...", choose "format".
    Or just copy paste the entire cell and paste accordingly lol
    Attached Files Attached Files

+ 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