+ Reply to Thread
Results 1 to 11 of 11

IF With Dates not adding up

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    IF With Dates not adding up

    Hi,

    I've attached a spreadsheet with a number of formulas.

    What I'm trying to do, is divide the Amount (column I) by the length (column M), to get the Amount per week.

    In columns P:AO I've added IF formulas to map the Amount to the right date. How ever, certain dates don't get add up.

    Row is 300,000, 4 weeks, or 75,000 per week. But when I look at AB3 - it has no Amount associated, even though it's in between the right dates, and I can't figure out why it won't map.

    Similar errors in the other rows..

    Many Thanks,

    eyeope
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: IF With Dates not adding up

    You have Sundays in row 2 while in columns J and K you have different weekdays. Probably this shall do, but please chceck it:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (change commas to semicolons if your language version requires so),
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    Re: IF With Dates not adding up

    Thanks Kaper,

    For example, I updated K6 to 20/1/2015 - The IF formulas give me an extra week instead of updating? (When i use the +6)..

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF With Dates not adding up

    I'm not clear where the payments should fall.

    If you have start date on a Thursday, e.g. 8 Jan 2015 and then end date the following Wed, 14 Jan 2015 then your formulas give 1 payment falling in week ending 11 Jan 2015 - is that correct.....and if so then what's the logic of the payment being in that week and not w/e 18 Jan? Is the payment deemed to be on a specific day?
    Audere est facere

  5. #5
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    Re: IF With Dates not adding up

    Thanks for answering!

    Basically, if I have 150,000 running though a periods of 3 weeks, I want it to map the 150,000 per each week. So, 50 per week - if that makes sense?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF With Dates not adding up

    Quote Originally Posted by eyeope View Post
    Basically, if I have 150,000 running though a periods of 3 weeks, I want it to map the 150,000 per each week. So, 50 per week - if that makes sense?
    Yes, I understand that part, but which 3 weeks? In my example there is only 1 week, so only 1 payment, but the period stretches across 2 weeks so in which week should that fall?

  7. #7
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    Re: IF With Dates not adding up

    I get what you're saying, and I guess that's the reason i'm stuck.

    For example,

    If I have 150,000 through 1/1/2015 - 20/1/2015 - it's a 3 week period, right? But technically according to my dates it should be mapped out on 4 date periods, since they're within the periods below:

    4/1/2015
    11/1/2015
    18/1/2015
    25/1/2015

    So, ideally I'd like it to map 37,500 on each week, but not sure how to, since in columns L, M & N it's mapped "correctly" as 3 weeks.

    Any suggestions?

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF With Dates not adding up

    OK, two possible suggestions for you - split the amount equally between all the weeks that are intersected by the date range - so if you have a Sunday to Sunday date range two weeks apart that's 15 days, 7 in two weeks but a single day in the other week. You would split the 150,000 into 3 lots of 50,000

    ....or you could do it by day, so you split 70,000, 70,000, 10,000 in my example

    It's relatively simple to produce formulas for either scenario - do you have a preference?

  9. #9
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    Re: IF With Dates not adding up

    Many Thanks for the quick response.

    The 70,70,10 scenario would actually fit perfectly :-)

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF With Dates not adding up

    To split based on days in each week try this formula in P2 copied across and down

    =MAX(0,MIN(P$2,$K3)-MAX(P$2-6,$J3)+1)*$I3/$L3

    You don't really need columns M or N

  11. #11
    Registered User
    Join Date
    10-08-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    43

    Re: IF With Dates not adding up

    MANY THANKS!!!

    Works like a charm.

+ 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. Adding values between dates and Dates are derived from formula
    By jenita.kurlawala in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-09-2013, 04:03 AM
  2. Adding Dates
    By conntech mike in forum Excel General
    Replies: 6
    Last Post: 07-26-2010, 04:14 PM
  3. Adding Dates
    By arebryn in forum Excel General
    Replies: 2
    Last Post: 06-24-2010, 12:16 PM
  4. Adding to dates?
    By burnsie in forum Excel General
    Replies: 6
    Last Post: 04-29-2010, 08:07 AM
  5. adding dates
    By hoser in forum Excel General
    Replies: 2
    Last Post: 03-28-2009, 12:47 AM

Tags for this Thread

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