You are here:

# Excel/if/lookup

Question
QUESTION: I want a formula that will see a certain name (from a list of multiple names used multiple times) in column B, see the corresponding monetary value in column E, add it to the previous corresponding monetary values in column E, and display the total so far in column F. I want it to do that for each line on the sheet. Thank you for your help!

Possibly I would guess you want a formula like

=Sumif(B:B,"Certain Name",E:E)

this would give you a total for a certain individual over all your data.

But after thinking more about what you said I would suggest the below:

If you want a progressive total ("total so far in column F") going down column F based on the name found in Column B, then in F2 (assume headers in row 1) put in the formula

F2:  =Sumif(\$B\$2:\$B2,\$B2,\$E\$2:\$E2)

then drag fill this formula down column F.

in F3 this will become  =Sumif(\$B\$2:\$B3,\$B3,\$E\$2:\$E3)
in F4 this will become  =Sumif(\$B\$2:\$B4,\$B4,\$E\$2:\$E4)

and so forth giving you teh "total so far" per name in column B.  So where we have not "fixed" the reference with a Dollar sign (\$), the row address will progress which matches one interpretation of your description

--
Regards,
Tom Ogilvy

---------- FOLLOW-UP ----------

QUESTION: Thank you, but what I want is more complicated than that... column B is list of MULTIPLE names, listed multiple times, in order of date. So column B goes something like this: Sarah N., Tammi P., Frederick T., Sarah N., David L., Tammi P., Samuel R., Sarah N., Sarah N., Taylor L. But each line I would like to have a running total in column F, which is basically that line's column E + all previous column E's that belong to the same person. Let me know if I need to send you the excel sheet so you can take a look. Thanks for the quick reply. Hope you can solve my problem and I hope this made more sense to you. Thanks.

Liz,

twogilvy@msn.com

Fill in a couple of the expected amounts in column F as well.  Perhaps that will provide more insight into what you want.

--

Regards, Tom Ogilvy
Questioner's Rating
 Rating(1-10) Knowledgeability = 9 Clarity of Response = 10 Politeness = 10 Comment Thank you!

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Tom Ogilvy

##### Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

##### Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.