+ Reply to Thread
Results 1 to 2 of 2

Range calculation between number of days multiplied by price

  1. #1
    Registered User
    Join Date
    12-08-2010
    Location
    Brussel
    MS-Off Ver
    Excel 2007
    Posts
    12

    Range calculation between number of days multiplied by price

    I want to calculate the following:

    01-Jan-2001 31-Jan-2001 1000 (=price)
    01-Feb-2001 01-Mar-2001 2000

    I have the start date 15-Jan-2001 until 15-Feb-2001

    Now it should calculate 15 days * 1000 + 15 days * 2000

    For only 2 rows its easy but it should be able to calulate for a whole range depending on start and
    end date....

    I added an example to explain a little better
    Attached Files Attached Files

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

    Re: Range calculation between number of days multiplied by price

    How many days at each rate do you expect for that example? If you use this formula

    =SUMPRODUCT(LOOKUP(ROW(INDIRECT(F6&":"&G6)),B2:B4,D2:D4))

    you'll get 14th only at 1000, 15th to 30th inclusive (16 days) at 2000 and then 31st to 4th inclusive (5 days) at 3000, 48,000 in total. You might not want to count both start and end dates.....

    ....and also note that the formula doesn't check that any date is before the date in C4, it'll assign the D4 value to any date greater than (or equal to) that in B4
    Audere est facere

+ 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