+ Reply to Thread
Results 1 to 8 of 8

Calculation assistance please

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Calculation assistance please

    Hi

    I have a workbook with 2 list boxes linked to B7 and D7 which looks up a flat service rate in the range C16 to D204 and this work fine and returns the basic charge for a weekday or weekend service for the first kilo

    =INDEX(C16:D204,B7,D7)

    The spanner in the works is that I have now been asked to make it calculate for a second and then subsequent kilos so I now have a cell H7 to enter the weight and I have added a column E16:E204 which contains a second and subsequent kilo charge.

    When a Country is selected from B7 and a service from D7 I would like a calculation in H11 to take the weight from H7 deduct it by 1 (because this is already included in the base charge in C16:D204) and then take the remaining kilos and multiply by the additional kilo rate in H7.

    I tried it like this but it says I have to few arguements

    =INDEX(C16:D204,B7,D7)+H7-1*INDEX(E16:E204)

    Can somebody point me in the right direction please?

    Thanks

    Danny

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,748
    How do you determine which value to take from E16:E204? If the 10th cell is for 10 kg etc then try

    =INDEX(C16:D204,B7,D7)+INDEX(E16:E204,H7-1)

  3. #3
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Calculation assitance

    Hi

    Thanks for the prompt response, that did not seem to work, maybe the attached stripped down example will give you a better idea of what I am trying to do

    Thanks

    Danny
    Attached Files Attached Files

  4. #4
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    129
    It should be:
    =INDEX(C16:D204,B7,D7)+H7-1*INDEX(E16:E204,B7)

    or for expandation:
    =INDEX(C16:D204,B7,D7)+H7-1*INDEX(E16:F204,B7,D7)
    Last edited by ptm0412; 07-15-2008 at 01:53 PM.

  5. #5
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Formula = miscalculation

    Hi Oldman

    Thanks for the input, this however miscalculates, if for example I enter 10 (kilos) in H11 and have selected UK - Aberdeen I would expect the following

    base charge C16 (£87.75) + 9 * E16 (2.45*9) so the result should be £109.80but using the suggested formula it returns £95.30?

    Perhaps I am implementing it incorrectly

    Danny

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How about?

    =INDEX(C16:D204,B7,D7)+(H7-1)*INDEX(E16:E204,B7)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Job done thanks

    Wow

    Well done that seems spot on, I will stress test it to death now

    Thanks

    Danny

  8. #8
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    129
    Sorry Danny, I forgot those brackets. How about the second formular (with H7-1 already surround with brackets)?
    =INDEX(C16:D204,B7,D7)+(H7-1)*INDEX(E16:F204,B7,D7)
    It is used for also weekday and weekend added kilos.

+ 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