+ Reply to Thread
Results 1 to 11 of 11

Beginning of Year Numbers Based on Expiration

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    25

    Beginning of Year Numbers Based on Expiration

    So I've been tasked to make a sheet that can pull an inventory number at the beginning of each year based on expiration dates. For example, the base year is 2013, and I have a certain number of gallons of milk from one source that all expire 5/1/2020 (implausible, I know). Then from another source I have 6 gallons that expire 4/30/2018, and so on. Does anyone have an idea of how to write a formula that would tell me how many gallons are good at the beginning of each year? So for year 1 (2013) it would be all of the milk, then at the beginning of 2014 it would be all the milk minus those that expired in 2013, etc. I have attached an example spreadsheet for consideration.

    example1.xlsx

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    =if(year($d3)=e$1;0;$c3)
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Beginning of Year Numbers Based on Expiration

    Quote Originally Posted by Fotis1991 View Post
    =if(year($d3)=e$1;0;$c3)
    Thanks for the reply!

    Bit of a problem, though. For some of them the numbers are off. After the expiration year, it should be 0 for each year rather than just 0 for that year. Also, at the beginning of the expiration year, the inventory should still exist - for example, in the one that expires 5/1/2020, for year 8 inventory it should be 29 rather than 0. Any idea how to fix this?

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    In E3 of my sample sheet put this. Copy down and across..

    =IF(YEAR($D3)<=E$1,0,$C3)

    OR

    =IF(YEAR($D3)<E$1,0,$C3)

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    duplicate post......Same problems.....
    Last edited by Fotis1991; 05-29-2013 at 10:33 AM.

  6. #6
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Beginning of Year Numbers Based on Expiration

    Quote Originally Posted by Fotis1991 View Post
    In E3 of my sample sheet put this. Copy down and across..

    =IF(YEAR($D3)<=E$1,0,$C3)

    OR

    =IF(YEAR($D3)<E$1,0,$C3)
    It's giving me "FALSE" in every cell

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    does not for me...
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Beginning of Year Numbers Based on Expiration

    Quote Originally Posted by Fotis1991 View Post
    does not for me...
    Hm, that's weird.

    Still need to figure out the other issue though...each of the values should carry over one extra year since they don't expire 1/1.

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    My formula is this.

    =IF(YEAR($D3)<=E$1,0,$C3)

    Delete the red part of the formula and try again...

  10. #10
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Beginning of Year Numbers Based on Expiration

    Quote Originally Posted by Fotis1991 View Post
    My formula is this.

    =IF(YEAR($D3)<=E$1,0,$C3)

    Delete the red part of the formula and try again...

    There it is. Thank you!

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Beginning of Year Numbers Based on Expiration

    ...........................

+ 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