Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default Sum function with asterisks

I have been given this function and understand what its doing but don't
understand what the asterisks are for, is it for multiplying or are they
wildcards?

=SUM((A2:A10="Phone")*(B2:B10="Jones")*C2:C10)

I've never seen them used like this before. Help please!

Diane
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sum function with asterisks

They are being used for multiplication.

The (A2:A10="Phone") and (B2:B10="Jones") both return either TRUE or FALSE.
Excel assigns the value of 1 to TRUE and 0 to FALSE. So, basically, the
value in column C is being multiplied by either 1 or 0 for each value in the
range.

HTH,
Elkar


"DianeG" wrote:

I have been given this function and understand what its doing but don't
understand what the asterisks are for, is it for multiplying or are they
wildcards?

=SUM((A2:A10="Phone")*(B2:B10="Jones")*C2:C10)

I've never seen them used like this before. Help please!

Diane

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sum function with asterisks

The terms (A2:A10="Phone") and (B2:B10="Jones") are logical
expressions which will equate to True or False - when used in
arithmetic they will take on the values 1 and 0 respectively.

So, you can think of the asterisks are multiplying the values as Excel
steps through the arrays A2:A10, B2:B10 and C2:C10 - the first 2 terms
will only be 1 or 0, so the combined value will only be non-zero if
the A and B element is non-zero, and C is non-zero. Thus the function
will add the values of the C range only when the A cell contains
"Phone" AND the B cell contains "Jones".

You can also think of the asterisks as carrying out an AND operation
on two or more arrays.

Hope this helps.

Pete

On Aug 20, 10:00 pm, DianeG wrote:
I have been given this function and understand what its doing but don't
understand what the asterisks are for, is it for multiplying or are they
wildcards?

=SUM((A2:A10="Phone")*(B2:B10="Jones")*C2:C10)

I've never seen them used like this before. Help please!

Diane



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Sum function with asterisks

Diane

I think you should have been given the formula

=SUMPRODUCT((A2:A10="Phone")*(B2:B10="Jones")*C2:C 10)

which sums the values in C2:C10 where A has Phone and B has Jones

See Bob Phillips' site for all you need to know about SUMPRODUCT and the
asterisks which in this case are multipliers.

http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Gord Dibben MS Excel MVP

On Mon, 20 Aug 2007 14:00:01 -0700, DianeG
wrote:

I have been given this function and understand what its doing but don't
understand what the asterisks are for, is it for multiplying or are they
wildcards?

=SUM((A2:A10="Phone")*(B2:B10="Jones")*C2:C10)

I've never seen them used like this before. Help please!

Diane


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
Finding asterisks GARY Excel Discussion (Misc queries) 2 August 26th 06 02:05 AM
Input box with asterisks kjworks Excel Discussion (Misc queries) 2 August 14th 06 12:10 PM
Can Text in an InputBox appear as asterisks? Chickyzee Excel Discussion (Misc queries) 0 January 16th 06 08:37 PM
I need to remove asterisks from a column of numbers Kevin Mack Excel Discussion (Misc queries) 1 November 29th 05 06:12 AM
Asterisks in Excel Walsh jj Excel Discussion (Misc queries) 1 June 17th 05 10:28 PM


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