Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-01-08
7
Medium Priority
?
467 Views
Last Modified: 2014-01-09
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
0
Comment
Question by:defecta
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 39767213
You don't need a VLOOKUP, just some SUMIF. See attachment.

HTH,
Dan
test1.xlsx
0
 
LVL 24

Expert Comment

by:Steve
ID: 39767314
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.
0
 
LVL 43

Expert Comment

by:Rob
ID: 39767403
(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))}
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 24

Expert Comment

by:Steve
ID: 39767718
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")
0
 
LVL 43

Expert Comment

by:Rob
ID: 39767728
Good point Steve, thanks for the heads up :)
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39767771
And so we get back to my initial solution... :)
0
 

Author Closing Comment

by:defecta
ID: 39769694
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question