#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Sumif Query

I want to sum values from Column B based on criteria in column A. sumif
formula works when the range is only 1 sheet but i have in excess of 30
sheets which i want to include in the range and criteria.

example formula

=SUMIF(sheet1:sheet30!b1:b6000,K12,sheet1:sheet30! b1:b6000) only returns
#value

Does anyone have any suggestions?

--
gibz
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Sumif Query

Try:


=SUMPRODUCT(SUMIF(INDIRECT("'"&C1:C35&"'!A1:A100") ,K12,INDIRECT("'"&C1:C35&"'!B1:B100")
))

where C1:C35 is a range housing the relevant sheetnames in separate cells.

HTH



"gibz" wrote:

I want to sum values from Column B based on criteria in column A. sumif
formula works when the range is only 1 sheet but i have in excess of 30
sheets which i want to include in the range and criteria.

example formula

=SUMIF(sheet1:sheet30!b1:b6000,K12,sheet1:sheet30! b1:b6000) only returns
#value

Does anyone have any suggestions?

--
gibz

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Sumif Query

Thanks, it's so simple when you know how.
--
gibz


"Toppers" wrote:

Try:


=SUMPRODUCT(SUMIF(INDIRECT("'"&C1:C35&"'!A1:A100") ,K12,INDIRECT("'"&C1:C35&"'!B1:B100")
))

where C1:C35 is a range housing the relevant sheetnames in separate cells.

HTH



"gibz" wrote:

I want to sum values from Column B based on criteria in column A. sumif
formula works when the range is only 1 sheet but i have in excess of 30
sheets which i want to include in the range and criteria.

example formula

=SUMIF(sheet1:sheet30!b1:b6000,K12,sheet1:sheet30! b1:b6000) only returns
#value

Does anyone have any suggestions?

--
gibz

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Sumif Query

When the sheets are structured named like that you can de it without storing
names in cells

=SUMPRODUCT(SUMIF(INDIRECT("'Sheet"&ROW(INDIRECT(" 1:30"))&"'!A1:A100"),K12,
INDIRECT(("'Sheet"&ROW(INDIRECT("1:30"))&"'!B1:B10 0"))))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"gibz" wrote in message
...
Thanks, it's so simple when you know how.
--
gibz


"Toppers" wrote:

Try:



=SUMPRODUCT(SUMIF(INDIRECT("'"&C1:C35&"'!A1:A100") ,K12,INDIRECT("'"&C1:C35&"
'!B1:B100")
))

where C1:C35 is a range housing the relevant sheetnames in separate

cells.

HTH



"gibz" wrote:

I want to sum values from Column B based on criteria in column A.

sumif
formula works when the range is only 1 sheet but i have in excess of

30
sheets which i want to include in the range and criteria.

example formula

=SUMIF(sheet1:sheet30!b1:b6000,K12,sheet1:sheet30! b1:b6000) only

returns
#value

Does anyone have any suggestions?

--
gibz



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
SumIf query ... muchacho Excel Worksheet Functions 21 June 28th 06 09:53 PM
Problems importing from an Access query Mike Excel Discussion (Misc queries) 0 June 20th 06 09:35 PM
changing query source [email protected] Excel Worksheet Functions 2 March 21st 06 08:55 PM
AHHH! Again JAA149 Excel Discussion (Misc queries) 0 October 31st 05 11:36 AM
AHHHH-Get Data from Multiple Excel workbooks JAA149 Excel Discussion (Misc queries) 5 October 30th 05 05:19 PM


All times are GMT +1. The time now is 11:09 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"