LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default How to sum selected values from a table?

Hej Thomas

You're welcome, and thanks for the feedback.
I'll give the links a try :-)

Med venlig hilsen
Leo Heuser


"Thomas Jedenfelt" skrev i en meddelelse
om...
Hej Leo,

Yes, I have a Swedish version of Excel 97, and changing
the operator from comma (,) to semicolon (;) in the matrix
of constants {"Book","Record"} did work.

(I should have figured that out myself, as I have learned
much about Excel formulae by trial and error <smile.)

With your TRANSPOSE-function, I now have the option to have
the selection criteria cells listed row by row (F1:F2),
instead of column by column (F1:G1).
=SUMPRODUCT((A1:A100=TRANSPOSE(F1:F2))*B1:B100)

(It took a while to get the formulae to work,
as I forgot how to enter this kind of
formulae: <Shift<Ctrl<Enter, which you mentioned.
<smile)


I think I should mention how I am using the formulae
you have helped me with. It's to get an overview of
my economy. I have one sheet for transactions and
another for summaries (overview).

The formulae below are for summarizing transaction types.
Without the formulae, I had to do some summarizing
_manually_, with the risk of making errors.
=PRODUKTSUMMA((Okt!D3:D43=D10)*Okt!E3:E43)
=PRODUKTSUMMA((Okt!C3:C43={3020;3030;3040;3050})*O kt!F3:F43)


To give something in return for all your help,
here are four useful links:

Google Labs
http://labs.google.com/
I recommend 'Search by Location' and 'News Alerts'.

timeanddate.com
http://www.timeanddate.com/worldclock/city.html?n=69
World Clock and Calendar, by a Norwegian guy.

All Music Guide (AMG)
http://www.allmusic.com/
Artist biographies and discographies.

Netcraft
http://www.netcraft.com/
Platform detection.


Thank you very much!

Hilsen
Thomas Jedenfelt,
a more content guy than prior to 23rd Oct.
<smile


"Leo Heuser" wrote in message

...
Hej igen igen


Your shorter formula did not work.
(I copied and pasted it.)
=SUMPRODUCT((A1:A100={"Book","Record"})*B1:B100)

The error pop-up said 'wrong formula'.
I presume that curley brackets {} is
for delimiting a matrix area.


Yes, it's a matrix of constants {"Book","Record"}
Be aware that the delimiter (here comma) must be
the localized equivalent, which in Sweden is semicolon,
so changing {"Book","Record"} to {"Book";"Record"}
should make the formula work.


Your formula =SUMPRODUCT((A1:A100=F1:G1)*B1:B100)
for selection criteria (F1:G1) did work, but only
within rows. Columns did _not_ work.
For example (selection criteria cells F1:F2)
=SUMPRODUCT((A1:A100=F1:F2)*B1:B100)


In order to make it work for columns, you have to use the
TRANSPOSE-function like this:

=SUMPRODUCT((A1:A100=TRANSPOSE(F1:F2))*B1:B100)
or
=SUM((A1:A100=TRANSPOSE(F1:F2))*B1:B100)

Both formulae must now be entered with <Shift<Ctrl<Enter, also
if edited later. If done correctly, Excel will display the formula
in the formula bar enclosed in curly brackets { }. Don't enter
these brackets yourself.
Using TRANSPOSE sets a maximum of 5461 items (F1:F5461),
but that's probably not a problem in this context :-)

---
Best Regards
Leo Heuser
Excel MVP




 
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
List values based on different values selected maniarasan Excel Discussion (Misc queries) 7 June 4th 10 02:12 PM
update selected table values BlackBayou Excel Discussion (Misc queries) 1 May 21st 10 03:45 PM
How to interchange the values between two selected cells? Ramesh Excel Discussion (Misc queries) 1 July 10th 09 12:22 PM
Adding values for selected years OSDavidL Excel Worksheet Functions 6 February 9th 06 09:55 AM
Averaging selected values Hellion Excel Worksheet Functions 3 July 4th 05 03:29 AM


All times are GMT +1. The time now is 05:17 AM.

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"