Got something to say or just want fewer pesky ads? Join us... 😊

Excel formula help please.



Garage_Doors

Originally the Swankers
Jun 28, 2008
11,789
Brighton
You guys last time were great last times so i will ask another please.

If i want to add up the totals for a particular supplier in the list below, is there a formula i can use that will give me the total spend for any given one?
ie adds up all that i have spent with each.
I know i can do a simple addsum and click each line entry but there must be an easier way?

Medlock £34.75
Diesel £50.00
Brewers £12.23
B&Q £30.00
B&Q £66.65
Brewers £17.83
Wickes £3.39
Wickes £149.00
Diesel £50.00
B&Q £76.09
Halfords £11.24
B&Q £30.00
Homebase £4.99
B&Q £7.92
Screwfix £1.02
Halfords £11.64
Wickes £60.42
Diesel £50.00
G&S Ltd £21.09
Brewers £4.03
B&Q £42.29
 




KZNSeagull

Well-known member
Nov 26, 2007
19,798
Wolsingham, County Durham
SUMIF

=SUMIF(A1:A999, "Wickes", B1:B999)

Column A has your company names, column B the amounts. No matter how many you add onto the list later, the function will still work (up to 999 rows obviously)
 




sllugaes

New member
Dec 15, 2012
673
SUMIF

=SUMIF(A1:A999, "Wickes", B1:B999)

Column A has your company names, column B the amounts. No matter how many you add onto the list later, the function will still work (up to 999 rows obviously)
Can I ask why have you shown wickes. Will this only add up all of wickes. What if you wanted B&Q would you then have to add the formula but with B&Q?
Thanks
 






Frank Inkerman

Veteran of the Crimea
SUMIF

=SUMIF(A1:A999, "Wickes", B1:B999)

Column A has your company names, column B the amounts. No matter how many you add onto the list later, the function will still work (up to 999 rows obviously)

As above, i.e. assuming that Column A has your company names, column B the amounts then somewhere else in the Worksheet list all your suppliers. You could copy Col A and then do a "Remove Duplicates" leaving you a list where each supplier is listed only once, this avoids typing each one in. Lets assume that your supplier list starts at F2 (to allow a heading saying "Supplier" in Cell F1) then in the next column the formula is =SUMIF(A:A,F2,B:B). You then copy this down and F2 will become F3 etc. Hope this works as have typed without trying it.
 












akipling

Active member
Jan 12, 2010
163
Morecambe
sumif is useful but if there are inconsistencies in suppliers (ie typos) then it will not include them

A pivot is probably the way forward as you'll get a total for each supplier and you will be able to give it a quick scan for any inconsistencies and amend accordingly before refreshing. Just remember that if you add extra lines to your database then you will need to change data source (found within developer on the ribbon at the top) - either that or allow for plenty of additional lines when setting it up thru the wizard
 








drew

Drew
Oct 3, 2006
23,045
Burgess Hill
=SUMIF(A1:A999, "Wickes", B1:B999)

Instead of "Wickes" type in a cell ref, eg D4 and then you just type the name of the supplier in D4 and it will come up with the answer. Quicker to find each total. Need to be accurate so possible select from drop down list created on a separate worksheet for suppliers.

As others have said, the alternative is an easy pivot table which will create a list of suppliers with their totals.
 






JCL666

absurdism
Sep 23, 2011
2,190
Whats a pivot table?:nono:

It does loads of cool stuff with raw data. You can aggregate with loads of different functions, filter etc.

Highlight the data (inc column headings), then (depending on the version of excel), choose data>pivot table.

I use them all the time.
 


Paul Reids Sock

Well-known member
Nov 3, 2004
4,458
Paul Reids boot








maltaseagull

Well-known member
Feb 25, 2009
12,990
Zabbar- Malta
Last edited:


Albion and Premier League latest from Sky Sports


Top
Link Here