+ Reply to Thread
Results 1 to 5 of 5

Need IF Formula involving Dates and Accumulators

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    Need IF Formula involving Dates and Accumulators

    hi,
    I am in need of assistance creating a formula (preferably a formula instead of a macro, if possible, although I am guessing a macro will be necessary). I attached an example.

    I am intending for this to be sort of a "calculator" for users. They will input data in B2, B3, B4, and E2. The data in cells A7:A32 will be pre-filled, along with cells B7:B32 (these will be hidden/locked from the user). Then E3 will be calculated primarily based on the date entered in B4.

    So I am trying to figure out how to write the formula in E3. For example if the date entered in B4 is between 1/20/2012 and 2/3/2012, then B9 will be subtracted from E2. If the date entered in B4 is between 5/25/2012 and 6/8/2012, then B18 will be subtracted from E2.
    The catch is that the dates will change annually, so ideally I would like for the formula to still work on a yearly basis.
    Here's the file: Sample.xlsx

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Need IF Formula involving Dates and Accumulators

    Pl see attache file.Formula is in E3.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Need IF Formula involving Dates and Accumulators

    Amazing. THANK YOU!

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Need IF Formula involving Dates and Accumulators

    There is small problem .I noticed now.

    pl change the formula as below


    =IF(B4<=A7,E2-B7,IFERROR(E2-INDEX(B7:B32,MATCH(B4,A7:A32,1)+1),"N/A"))

    Thanks.

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    GB, WI
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Need IF Formula involving Dates and Accumulators

    thank you for the update. Much appreciated

+ 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