Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
joe joe is offline
external usenet poster
 
Posts: 1
Default Need help with an excel formula

I have a really tough question that I hope someone can help me with.
Basically, I need to sum up data from three worksheets, but only if a
certain condition is met. For example, In 3 worksheets, I have data in
B1, B2, B3. A1, A2 and A3 have 3 names in them in each worksheet. Now,
I know how to take the sum of each worksheet, but I only want to take
the sum of everything excluding cell B2 which is Bill in the example
below.


The data below appears exactly like this in all three worksheets.

sheet1
A1 A2 A3
john bill John

B1 B2 B3
12 45 13

sheet2
A1 A2 A3
john bill John

B1 B2 B3
12 45 13

sheet3
A1 A2 A3
john bill John

B1 B2 B3
12 45 13

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Need help with an excel formula

I'm assuming that I should not take your example literally! If I did then
you could do this:

=SUM(Sheet1:Sheet3!B1)+SUM(Sheet1:Sheet3!B3)

Otherwise, try this:

=SUMPRODUCT(SUMIF(INDIRECT("sheet"&{1,2,3}&"!A1:A3 "),"<Bill",INDIRECT("sheet"&{1,2,3}&"!B1:B3") ))

Now, if your real sheet names aren't Sheet1, Sheet2, Sheet3...

List the sheet names in a range of cells like H1:H3 then:

=SUMPRODUCT(SUMIF(INDIRECT("'"&H1:H3&"'!A1:A3"),"< Bill",INDIRECT("'"&H1:H3&"'!B1:B3")))

Biff
Microsoft Excel MVP

"joe" wrote in message
oups.com...
I have a really tough question that I hope someone can help me with.
Basically, I need to sum up data from three worksheets, but only if a
certain condition is met. For example, In 3 worksheets, I have data in
B1, B2, B3. A1, A2 and A3 have 3 names in them in each worksheet. Now,
I know how to take the sum of each worksheet, but I only want to take
the sum of everything excluding cell B2 which is Bill in the example
below.


The data below appears exactly like this in all three worksheets.

sheet1
A1 A2 A3
john bill John

B1 B2 B3
12 45 13

sheet2
A1 A2 A3
john bill John

B1 B2 B3
12 45 13

sheet3
A1 A2 A3
john bill John

B1 B2 B3
12 45 13



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
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
match formula - 2 excel files:#1 hasthis formula, 2nd has the Raw DS Excel Worksheet Functions 4 October 7th 06 12:25 AM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
How do I view formula results intead of formula in excel? davidinatlanta Excel Worksheet Functions 4 February 7th 06 03:02 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 08:44 PM.

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"