Avatar of defecta
defecta
Flag for Australia asked on

Excell formula to find the sum of all cells in column X from a vlookup in column y?

Hi guys,

I have a csv file contains a log of all the print jobs in chronological order.
each row has the user name and the total number of pages printed.

I want to add a column that has the sum total of all the print jobs for that user.

I'm thinking if I could sum all the cells in column X from a vlookup of all the cells in column Y this would get me the result I want, would it not?

I just have no idea how to write it or if those formulas are the right way to go about it. Any suggestions?

I am using Office 2010

Thanks in advance.
AC
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
defecta

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dan Craciun

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Steve

For what you want to do I would suggest a PIVOTTABLE.

This will be more useful as it can be sorted alphabetically, grouped by dates, etc etc.

To add a pivot table, select a cell in your data, choose the INSERT tab and The first icon should be PIVOTTABLE.

There are many guides on Pivot Tables on the web such as this...
http://www.experts-exchange.com/VP_1.html
Go to course progress, pivottables for the relevant PivotTable stuff.
Rob

(no points) Pivot table is definitely the way to go.. I was going to suggest an array formula if you're just looking at one user but a pivot would show you everyone as well as giving you the ability to

if one of the user's is say "john" then you're array formula would be
assuming Col A is username and Col B is the number of print jobs

=SUM(IF(A1:A2000="john",B1:B2000,0))

but you need to press CTRL + SHIFT + ENTER after to finish entering the formula

if you've done that right you'll see curly braces

{=SUM(IF(A1:A2000="john",B1:B2000,0))}
Steve

Rob, ditch the array formula in Excel 2010 for SUMIFS or simply SUMIF for all versions... no benifit from an array formula there.

=SUMIF(A1:A2000,"john",B1:B2000)

=SUMIFS(B1:B2000, A1:A2000,"john")
Your help has saved me hundreds of hours of internet surfing.
fblack61
Rob

Good point Steve, thanks for the heads up :)
Dan Craciun

And so we get back to my initial solution... :)
defecta

ASKER
Thanks DanCraciun and everyone else for their valuble input.

I was making a simple task a lot harded than It needed to be because of a lack of knowledge of what Excel can do. Thanks again for the simple and clear answer and explanation.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.