Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 90
Default A single SUMPRODUCT Excel formula cover four worksheets

I have four worksheets as follow: PC, OZ, IM and KL; each of the worksheet is
containing data.

In another separate worksheet is performing the analytic function. In this
worksheet, only one type of excel formular is applying: SUMPRODUCT(--(x=x),--
(y=y),--(z=z),(A:A).

Because there are four worksheets, I need to set four formula as following in
one cell:
SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),
(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--
(z=z),(A:A)

I feel above formula is a very very long formula and make the size of the
Excel file very huge.

My question is that is there any way to make ONE Excel formula to cover the
four worksheets and at the same time still allow to perform SUMPRODUCT
function?

Many thanks,
Wilchong

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,480
Default A single SUMPRODUCT Excel formula cover four worksheets

Hi

You could carry out the Sumproduct on each individual sheet in an area to
the right of your data, say cell X1 onward
Then create 2 new sheets called First and Last, and drag these to a position
which "sandwiches" your 4 data sheets e.g.
Summary, First PC, OZ, IM, KL, Last

On the summary sheet then you can just use
=SUM(First:Last!X1)
The sheets First and Last can be hidden once you have placed them in their
correct location
--
Regards
Roger Govier

"wilchong via OfficeKB.com" <u43231@uwe wrote in message
news:8439538dffe8a@uwe...
I have four worksheets as follow: PC, OZ, IM and KL; each of the worksheet
is
containing data.

In another separate worksheet is performing the analytic function. In this
worksheet, only one type of excel formular is applying:
SUMPRODUCT(--(x=x),--
(y=y),--(z=z),(A:A).

Because there are four worksheets, I need to set four formula as following
in
one cell:
SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),
(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--
(z=z),(A:A)

I feel above formula is a very very long formula and make the size of the
Excel file very huge.

My question is that is there any way to make ONE Excel formula to cover
the
four worksheets and at the same time still allow to perform SUMPRODUCT
function?

Many thanks,
Wilchong

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 90
Default A single SUMPRODUCT Excel formula cover four worksheets

Hello Roger,
Many thanks for your advice!

I understand your strategy. However, according to your way, it will create
more worksheets and make the size of the file is much larger!

I want a formula which really make thing simple. Ideally, the SUMPRODUCT can
sum up the data from various worksheets WITHOUT create extra worksheets and
at the same time reduce the size of the file! That is what I want!

Many thanks for your effort!
Wilchong


Roger Govier wrote:
Hi

You could carry out the Sumproduct on each individual sheet in an area to
the right of your data, say cell X1 onward
Then create 2 new sheets called First and Last, and drag these to a position
which "sandwiches" your 4 data sheets e.g.
Summary, First PC, OZ, IM, KL, Last

On the summary sheet then you can just use
=SUM(First:Last!X1)
The sheets First and Last can be hidden once you have placed them in their
correct location
I have four worksheets as follow: PC, OZ, IM and KL; each of the worksheet
is

[quoted text clipped - 22 lines]
Many thanks,
Wilchong


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,480
Default A single SUMPRODUCT Excel formula cover four worksheets

Hi

Adding 2 blank sheets to the file will make a negligible difference to file
size - about 3Kb
It is when you add more data or more formulae that the file size increases.
Try it and see.

--
Regards
Roger Govier

"wilchong via OfficeKB.com" <u43231@uwe wrote in message
news:843b2029ba9f0@uwe...
Hello Roger,
Many thanks for your advice!

I understand your strategy. However, according to your way, it will
create
more worksheets and make the size of the file is much larger!

I want a formula which really make thing simple. Ideally, the SUMPRODUCT
can
sum up the data from various worksheets WITHOUT create extra worksheets
and
at the same time reduce the size of the file! That is what I want!

Many thanks for your effort!
Wilchong


Roger Govier wrote:
Hi

You could carry out the Sumproduct on each individual sheet in an area to
the right of your data, say cell X1 onward
Then create 2 new sheets called First and Last, and drag these to a
position
which "sandwiches" your 4 data sheets e.g.
Summary, First PC, OZ, IM, KL, Last

On the summary sheet then you can just use
=SUM(First:Last!X1)
The sheets First and Last can be hidden once you have placed them in their
correct location
I have four worksheets as follow: PC, OZ, IM and KL; each of the
worksheet
is

[quoted text clipped - 22 lines]
Many thanks,
Wilchong


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 857
Default A single SUMPRODUCT Excel formula cover four worksheets

Hi,

There are a couple of other things you can do:

0. You don't need parenthesis around the A:A references. This will reduce
the formula down by 8 characters.

1. Consider range names: Since the last range of your formula reflects an
entire column the other three references must also reflect entire columns,
so you should define range names for each column, the shorter the better,
for example, E, X, Y, Z, F, M, N, O, G, T, U, V, H, J, K, L and A, B, D. X,
Y, and Z represent the columns you are testing on the PC sheet, and E is the
numeric column on that same sheet. A, B, and D are the names of the cells
on the summary sheet which contain the values you are testing against. If
there are a lot of these you can either leave cell addresses in or define
the range as an array. By doing this the formulas reduce from things like
PC!X:X=a1 to X=A.

This reduces the overall formula from
=SUMPRODUCT(--(PC!x:x=A1),--(PC!y:y=B1),--(PC!z:z=C1),(A:A))+SUMPRODUCT(...
to
=SUMPRODUCT(--(X=A),--(Y=B),--(A=D),E)+SUMPRODUCT(...

2. Replace -- with the N function:
This reduces the formulas from
=SUMPRODUCT(--(X=A),--(Y=B),--(Z=D),E)+SUMPRODUCT(...
to
=SUMPRODUCT(N(X=A),N(Y=B),N(Z=D),E)+SUMPRODUCT(...
Which are actually 12 characters shorter.

but then you could
3. Combine multiple operations within one SUMPRODUCT
This reduces the formulas from
=SUMPRODUCT(N(X=A),N(Y=B),N(Z=D),E)+SUMPRODUCT(...
to
=SUMPRODUCT(N(X=A)*N(Y=B)*N(Z=D)*E+N(M=A)*N(N=B)*N (O=C)*F+...

This eliminates 3 of the 4 SUMPRODUCT functions, reducing the formula by 30
characters (actually it also eliminates the need for both an () parenthesis
for those 2 components, so its really 36 characters shorter.

4. You could enter it as an array and reduce the formula by another 7
characters but the calculations will be slower even if the file size is
smaller and the formula length shorter.

The final formula would be something like in its entirety:

=SUMPRODUCT(N(X=A)*N(Y=B)*N(Z=D)*E+N(M=A)*N(N=B)*N (O=C)*F+N(T=A)*N(U=B)*N(V=C)*G+N(J=A)*N(K=B)*N(L=C )*H)

This is probably far shorter than what you are currently using, even though
its not short. Even if you use addresses on the summary sheet for A, B, and
D references, the formula still remains shorter by far. (I did not use C as
a range name because it is reserved by Excel).

There are other things that could be done also, depending on the layout of
the summary page.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"wilchong via OfficeKB.com" <u43231@uwe wrote in message
news:8439538dffe8a@uwe...
I have four worksheets as follow: PC, OZ, IM and KL; each of the worksheet
is
containing data.

In another separate worksheet is performing the analytic function. In this
worksheet, only one type of excel formular is applying:
SUMPRODUCT(--(x=x),--
(y=y),--(z=z),(A:A).

Because there are four worksheets, I need to set four formula as following
in
one cell:
SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),
(A:A)+SUMPRODUCT(--(x=x),--(y=y),--(z=z),(A:A)+SUMPRODUCT(--(x=x),--(y=y),--
(z=z),(A:A)

I feel above formula is a very very long formula and make the size of the
Excel file very huge.

My question is that is there any way to make ONE Excel formula to cover
the
four worksheets and at the same time still allow to perform SUMPRODUCT
function?

Many thanks,
Wilchong

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200805/1

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
Excel Cover Page Michaellou Excel Discussion (Misc queries) 3 February 28th 08 10:07 PM
Printing single pages from multiple worksheets in a single print job [email protected] Excel Discussion (Misc queries) 2 April 27th 07 06:11 PM
?set up a print range to cover multiple pages in excel JBC Excel Worksheet Functions 3 March 6th 06 03:04 PM
HELP! Single cell formula to calculate weeks cover of stock on forward sales. [email protected] Excel Worksheet Functions 2 January 13th 06 10:24 AM
how to cover the formula Lawrence Excel Worksheet Functions 7 December 16th 05 05:23 PM


All times are GMT +1. The time now is 08:27 AM.

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

About Us

"It's about Microsoft Excel"