+ Reply to Thread
Results 1 to 3 of 3

Excel Formula Help : IF + Vlookup + Sum

Hybrid View

  1. #1
    Registered User
    Join Date
    04-15-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    Excel Formula Help : IF + Vlookup + Sum

    Hi Guys,

    New to the forum, and must commend the great help its been over the years, but ahve a question which i cannot find teh answer to, regarding an IF + Vlookup + Sum Formula.

    Here is the sheet i am working with,

    Cost Table Day 1 to 3 Day 4 to 8 Day 8 or Greater
    Adam $10 $20 $30
    Ben $15 $30 $45
    Chris $8 $17 $28
    Dave $14 $29 $32
    Ed $25 $28 $35
    Fay $7 $17 $24
    Gary $11 $21 $31
    Harry $13 $22 $36


    Days Worked Cost
    Adam 2 ?
    Harry 5 ?
    Fay 9 ?
    Ben 15 ?
    Adam 22 ?
    Gary 7 ?
    Dave 4 ?
    Chris 8 ?
    Ed 3 ?



    I need a forumla, that will be able to calculate the cost related to each person, based on the specific cost per day from the Cost Table.

    So for example, if we take the second item, Harry.
    The forumla, should look up the name Harry in the Cost table, then detect that the days worked for him is 5, then perform a calculation for his cost. ie. 3 days x $13 and 2 days x $22.

    Have attached the excel file for better viewing.

    Hope that is clear enough to assist me.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by NBVC; 04-15-2010 at 10:37 AM.

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

    Re: Excel Formula Help : IF + Vlookup + Sum

    Try:

    =MIN(B12,3)*VLOOKUP(A12,$A$2:$D$9,2,0)+IF(B12>3,MIN(B12-3,5)*VLOOKUP(A12,$A$2:$D$9,3,0),0)+IF(B12>8,(B12-8)*VLOOKUP(A12,$A$2:$D$9,4,0),0)

    copied down.

    or if your names are alphabetically ascendingly listed as per sample, then

    =MIN(B12,3)*LOOKUP(A12,$A$2:$B$9)+IF(B12>3,MIN(B12-3,5)*LOOKUP(A12,$A$2:$C$9),0)+IF(B12>8,(B12-8)*LOOKUP(A12,$A$2:$D$9),0)
    Last edited by NBVC; 04-15-2010 at 08:42 AM.
    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.

  3. #3
    Registered User
    Join Date
    04-15-2010
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Excel Formula Help : IF + Vlookup + Sum

    Thanks Works like the bomb!

    Great help, and super fast!

+ 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