A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUMIF + INDIRECT?



 
 
Thread Tools Display Modes
  #1  
Old February 22nd, 2007, 06:23 PM posted to microsoft.public.excel.worksheet.functions
Davoud
external usenet poster
 
Posts: 15
Default SUMIF + INDIRECT?

I've used SUMIF for simple calculations such as:

SUMIF($F$32:$F$39,"Contracted",$H$32:$H$39)

on a single sheet.

How would I work that using INDIRECT to perform that same function for
multiple sheets?

I can't seem to make it work using a similar format to:

SUM(INDIRECT($B6&"!$H$17:$H$20") where B6 is the worksheet name I want to
reference.

In my example I am trying to sum the dollar amounts in column H for those
services that are labeled Contracted in column F across multiple worksheets
(ie. for each worksheet, I want one total dollar amount).

Is it SUMIF plus INDIRECT or is there another way to go about it?
  #3  
Old February 22nd, 2007, 07:27 PM posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
external usenet poster
 
Posts: 4,085
Default SUMIF + INDIRECT?

This worked for me
=SUMIF(INDIRECT(B6&"!B1:B10"),"X",INDIRECT(B6&"!A1 :A10"))
B6 had the text Sheet2
If column B has an X then sum corresponding A cell on Sheet2
You know that sheet names with spaces in them need to be within single
quotes?

best wishes


--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Davoud" wrote in message
...
I've used SUMIF for simple calculations such as:

SUMIF($F$32:$F$39,"Contracted",$H$32:$H$39)

on a single sheet.

How would I work that using INDIRECT to perform that same function for
multiple sheets?

I can't seem to make it work using a similar format to:

SUM(INDIRECT($B6&"!$H$17:$H$20") where B6 is the worksheet name I want to
reference.

In my example I am trying to sum the dollar amounts in column H for those
services that are labeled Contracted in column F across multiple
worksheets
(ie. for each worksheet, I want one total dollar amount).

Is it SUMIF plus INDIRECT or is there another way to go about it?



  #4  
Old February 22nd, 2007, 07:37 PM posted to microsoft.public.excel.worksheet.functions
Davoud
external usenet poster
 
Posts: 15
Default SUMIF + INDIRECT?

Thanks Sandy. I did get it with:

=SUMIF(INDIRECT("'"&B6&"'!$F$32:$F$47"),"Contracte d",INDIRECT("'"&B6&"'!$H$32:$H$47"))


"Sandy Mann" wrote:

There may be better ways but try something like:

=SUMPRODUCT((INDIRECT(B6&"!$F$32:$F$39")="Contract ed")*INDIRECT(B6&"!$H$32:$H$39"))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Davoud" wrote in message
...
I've used SUMIF for simple calculations such as:

SUMIF($F$32:$F$39,"Contracted",$H$32:$H$39)

on a single sheet.

How would I work that using INDIRECT to perform that same function for
multiple sheets?

I can't seem to make it work using a similar format to:

SUM(INDIRECT($B6&"!$H$17:$H$20") where B6 is the worksheet name I want to
reference.

In my example I am trying to sum the dollar amounts in column H for those
services that are labeled Contracted in column F across multiple
worksheets
(ie. for each worksheet, I want one total dollar amount).

Is it SUMIF plus INDIRECT or is there another way to go about it?




  #5  
Old February 22nd, 2007, 07:50 PM posted to microsoft.public.excel.worksheet.functions
Sandy Mann
external usenet poster
 
Posts: 2,264
Default SUMIF + INDIRECT?

Glad you got there - I told you that there were better ways g

--


Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Davoud" wrote in message
...
Thanks Sandy. I did get it with:

=SUMIF(INDIRECT("'"&B6&"'!$F$32:$F$47"),"Contracte d",INDIRECT("'"&B6&"'!$H$32:$H$47"))


"Sandy Mann" wrote:

There may be better ways but try something like:

=SUMPRODUCT((INDIRECT(B6&"!$F$32:$F$39")="Contract ed")*INDIRECT(B6&"!$H$32:$H$39"))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Davoud" wrote in message
...
I've used SUMIF for simple calculations such as:

SUMIF($F$32:$F$39,"Contracted",$H$32:$H$39)

on a single sheet.

How would I work that using INDIRECT to perform that same function for
multiple sheets?

I can't seem to make it work using a similar format to:

SUM(INDIRECT($B6&"!$H$17:$H$20") where B6 is the worksheet name I want
to
reference.

In my example I am trying to sum the dollar amounts in column H for
those
services that are labeled Contracted in column F across multiple
worksheets
(ie. for each worksheet, I want one total dollar amount).

Is it SUMIF plus INDIRECT or is there another way to go about it?






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.