+ Reply to Thread
Results 1 to 4 of 4

How to calculate this?

  1. #1
    Registered User
    Join Date
    09-15-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    17

    How to calculate this?

    Hi,

    I'd like to know how I can calculate the costs for each people in the table below:

    excel.png

    Thanks

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to calculate this?

    Enter formula in H2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F G H
    1 # Expense Price Paid by
    2 1 Service 1 150 John John 530
    3 2 Service 2 100 Peter Peter 470
    4 3 Service 3 200 John
    5 4 Service 4 250 Peter
    6 5 Service 5 180 John
    7 6 Service 6 120 Peter
    8
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How to calculate this?

    Hi All,

    another approach matching "name's expenses" in G2


    =SUMPRODUCT(C$2:C$100*(D$2:D$100&"'s expenses"=G2))

    or

    =SUMPRODUCT(C$2:C$100*(D$2:D$100=SUBSTITUTE(G2,"'s expenses","")))


    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Contributor
    Join Date
    12-18-2016
    Location
    London
    MS-Off Ver
    Microsoft 2013
    Posts
    145

    Re: How to calculate this?

    =SUMPRODUCT(C$2:C$100*(D$2:D$100&"John"=G2))

    =SUMPRODUCT(C$2:C$100*(D$2:D$100&"Peter"=G2))

+ 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. [SOLVED] Formula: If cell 3 is blank have cell 1 calculate, if cell 3 filled have cell 2 calculate
    By Vicious00013 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-05-2016, 09:34 AM
  2. Code to Calculate the product of two matrices won't calculate
    By njrobby in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2015, 01:37 AM
  3. Target.Calculate to Me.Calculate breaks Copy/Paste
    By vayana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2013, 10:36 AM
  4. [SOLVED] Calculate values in col B based on value in col B but only calculate final 5 instances
    By arnoldd99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 11:53 AM
  5. how to calculate?
    By massa56 in forum Excel General
    Replies: 7
    Last Post: 02-23-2009, 07:15 AM
  6. Calculate only if...
    By cribology - ExcelForums.com in forum Excel General
    Replies: 2
    Last Post: 07-26-2005, 02:05 PM

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