Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 4
Default SUMIF over multiple spreadsheets

Hi,

I would like to use the following formula over 30+ worksheets in the same workbook but I do not want to have to repeat sum if over and over again.

I have tried my own research and most people suggest sumif with sumproduct and indirect but I cannot get my head round it.

This is the formula I am using at the moment:

=(SUMIF('SMITH S'!V$4:V$22,C5,'SMITH S'!W$4:W$22))

'Smith S' is an employee name and the other sheets are all named in that format. I have created a list and defined a name for it called 'tabs'. I understand you need to do this for the indirect function?

Can some body reply with the formula I need to use that includes my other 30 worksheets please?
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mark234 View Post
Hi,

I would like to use the following formula over 30+ worksheets in the same workbook but I do not want to have to repeat sum if over and over again.

I have tried my own research and most people suggest sumif with sumproduct and indirect but I cannot get my head round it.

This is the formula I am using at the moment:

=(SUMIF('SMITH S'!V$4:V$22,C5,'SMITH S'!W$4:W$22))

'Smith S' is an employee name and the other sheets are all named in that format. I have created a list and defined a name for it called 'tabs'. I understand you need to do this for the indirect function?

Can some body reply with the formula I need to use that includes my other 30 worksheets please?
Hi,

Assuming "Smith S" is recorded in cell A7 (amend this to suit), the formula would be:

=SUMIF(INDIRECT(A7&"!V$4:V$22"),C5,INDIRECT(A7&"!W $4:W$22"))

HOWEVER, you cannot use spaces in the tab names. So you would have to have "Smith_S" or "SmithS" or "Smith.S" or something similar.

As for needing to define a range name for INDIRECT to work.... Never had to do that. You just need the tab names in a list that you will refer to.

Last edited by Spencer101 : July 1st 12 at 07:39 AM
  #3   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Spencer101 View Post
Hi,

Assuming "Smith S" is recorded in cell A7 (amend this to suit), the formula would be:

=SUMIF(INDIRECT(A7&"!V$4:V$22"),C5,INDIRECT(A7&"!W $4:W$22"))

HOWEVER, you cannot use spaces in the tab names. So you would have to have "Smith_S" or "SmithS" or "Smith.S" or something similar.

As for needing to define a range name for INDIRECT to work.... Never had to do that. You just need the tab names in a list that you will refer to.
Hey

Thanks for replying - I tried your advice but I am getting the REF error - can you take a look at the attached please and see where I am going wrong?

I would like the formula on the 'SUMMARY' tab to the right of the 9 digit codes...where I started my original SUMIF formula.
Attached Files
File Type: zip exp 1.zip (89.6 KB, 61 views)
  #4   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mark234 View Post
Hey

Thanks for replying - I tried your advice but I am getting the REF error - can you take a look at the attached please and see where I am going wrong?

I would like the formula on the 'SUMMARY' tab to the right of the 9 digit codes...where I started my original SUMIF formula.
Hi Mark,

I'm not 100% sure I understand what you're trying to do on your summary sheet. Could you explain a little more?

Spencer.
  #5   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Spencer101 View Post
Hi Mark,

I'm not 100% sure I understand what you're trying to do on your summary sheet. Could you explain a little more?

Spencer.
The 490240-012 is a list of profit and loss codes - these codes will appear in the individual tabs and I would like to add up the net expense total of 490240-012 and all the other codes each time it appears for each employees tab.

Take a look at the attached, it's what I have just changed around - some of the errors still remain though and not sure why.
Attached Files
File Type: zip exp 3.zip (92.5 KB, 45 views)

Last edited by Mark234 : July 1st 12 at 11:48 AM


  #6   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mark234 View Post
The 490240-012 is a list of profit and loss codes - these codes will appear in the individual tabs and I would like to add up the net expense total of 490240-012 and all the other codes each time it appears for each employees tab.

Take a look at the attached, it's what I have just changed around - some of the errors still remain though and not sure why.
Could any of the codes appear more than once on an individual employee tab?
  #7   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Spencer101 View Post
Could any of the codes appear more than once on an individual employee tab?
Possibly - but not really. If the code was already on the spreadsheet then the net expense would go against that code. no reason to add the same code...could this be the problem?

I see what you mean now....and yes they would and do appear more than once on an individual tab.....

Last edited by Mark234 : July 1st 12 at 12:05 PM
  #8   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mark234 View Post
Possibly - but not really. If the code was already on the spreadsheet then the net expense would go against that code. no reason to add the same code...could this be the problem?

I see what you mean now....and yes they would and do appear more than once on an individual tab.....
Right, then the approach I've just tried might not be what you're after.

I shall mock up another way of doing it.
I've PM'd you with an email address as the file will be too big to post back here by the time the formulas are added as the file size limit on this forum is tiny!
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 259
Default SUMIF over multiple spreadsheets

Hi Mark

IMO your layout is wrong.

I would be more inclined to have 1 sheet to record all the entries in
columns, the mega benefit of this is that you dont have to worry about
complex formulas branching across several sheets.

Date | Emp | Expense | Amount | VAT


You could then look at a matrix grid for your Summary Sheet.

You could also have another sheet which you could use for one-off
employee search | View | Print on a Monthly/Annual basis....

This would mean you will eliminate the need for multiple tabs for each
employee, which would expand & contract due to attrition.

I would be happy to redo your existing and send it to you for your perusal.

Cheers
HTH
Mick.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update multiple spreadsheets in multiple workbooks TAP Setting up and Configuration of Excel 1 October 5th 10 01:36 AM
SUMPRODUCT, SUMIF, COUNTIF for multiple sheets for multiple criter Greg in CO[_2_] Excel Worksheet Functions 0 September 18th 08 05:51 PM
SUMIF - counting across different spreadsheets JoFo Excel Worksheet Functions 2 July 19th 06 02:47 PM
SUMIF with multiple criteria for multiple columns to sum a single SavageMind Excel Programming 1 July 27th 05 03:34 PM
How to update multiple links in multiple spreadsheets followin mo. Andy Excel Worksheet Functions 0 January 20th 05 04:51 PM


All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"