You are here:

Excel/SUMIF multiple worksheets

Advertisement


Question
I have 20 worksheets that contain some of the same data (names).  I want the formula to look at every worksheet, look for the name on my Totals worksheet in a specific column, then sum the data on the Totals worksheet.  Names are in the 'A' column on each sheet, data to sum is in the 'B' column on each sheet.

This is what I have that's not working.

=SUMIF(SMITH:JOHNSON!A4:A200,TotalsA3,SMITH:JOHNSON!B4:B200)

Thanks!

Ray


Answer
Hi Ray,

SUMIF is not a 3-D function, thus it cannot be used across multiple worksheets.
See http://office.microsoft.com/en-us/excel/HP101023461033.aspx for a list of Excel functions that support 3-D referencing.

It is a better solution to implement it using VBA, or create a SUMIF in each worksheet and summing them up in the totals worksheet.

Alternatively, there is a library developed by Laurent Longre -
http://xcell05.free.fr/morefunc/english/ - which contains a function THREED that can coerce a 3D range into a single array - enables array formulae with 3D references.

Using THREED, the formula to use is:
=SUMPRODUCT(THREED('SMITH:JOHNSON'!A4:A200),THREED('SMITH:JOHNSON'!B4:B200))

Please do not hesitate to contact me if you need further assistance.
Thank you.

Regards,
Victor LAN  
About Excel
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

All Answers

Answers by Expert:


Ask Experts

Volunteer


Victor Lan

Expertise

I use Excel at work and can assist you in manipulating and filtering data, creating and using formulas, pivot tables, and writing VBA to solve problems and automate processes. I'm willing to research and find a solution for almost anything in Excel for you.

Experience

3 years of professional Excel experience. I currently work for a global investment bank and our team is responsible for certifying the daily profit and loss of the trading desk. Excel is one of the primary tools used at work.

Organizations
Member of Toastmasters International.

Education/Credentials
BSc Banking and Finance (First Class Honours), University of London. Diploma in Electronics, Computer and Communication Engineering, Singapore Polytechnic.

©2009 About.com, a part of The New York Times Company. All rights reserved.