Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default SUMIF and text with decimals

Why does Excels SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range and
criteria?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default SUMIF and text with decimals

SUMIF (and COUNTIF) does not make a difference between numbers and numbers
represented as text, you would need to use SUMPRODUCT for that

=SUMPRODUCT(--(A2:A100="2.10"),B2:B100)

will sum B2:B100 where A2:A100 equals "2.10"




--


Regards,


Peo Sjoblom




"Mark" wrote in message
...
Why does Excel's SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range and
criteria?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default SUMIF and text with decimals

Nel ,
Mark ha scritto:
Why does Excels SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range
and criteria?


Hi Mark,

because Excel treat as number text that can be treated as number, when you
use it in calculation.

So if you use a number formatted as text in a calculation, it will be
treated as a number.


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default SUMIF and text with decimals

Thank you - that works

"Peo Sjoblom" wrote:

SUMIF (and COUNTIF) does not make a difference between numbers and numbers
represented as text, you would need to use SUMPRODUCT for that

=SUMPRODUCT(--(A2:A100="2.10"),B2:B100)

will sum B2:B100 where A2:A100 equals "2.10"




--


Regards,


Peo Sjoblom




"Mark" wrote in message
...
Why does Excel's SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range and
criteria?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default SUMIF and text with decimals

Only some function do that, not SUMPRODUCT for instance


--


Regards,


Peo Sjoblom




"Franz Verga" wrote in message
...
Nel ,
Mark ha scritto:
Why does Excel's SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range
and criteria?


Hi Mark,

because Excel treat as number text that can be treated as number, when you
use it in calculation.

So if you use a number formatted as text in a calculation, it will be
treated as a number.


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 459
Default SUMIF and text with decimals

Thank you for clarification

--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy
"Peo Sjoblom" ha scritto nel messaggio
...
Only some function do that, not SUMPRODUCT for instance


--


Regards,


Peo Sjoblom




"Franz Verga" wrote in message
...
Nel ,
Mark ha scritto:
Why does Excel's SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range
and criteria?


Hi Mark,

because Excel treat as number text that can be treated as number, when
you use it in calculation.

So if you use a number formatted as text in a calculation, it will be
treated as a number.


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default SUMIF and text with decimals

Thanks Franz

"Franz Verga" wrote:

Nel ,
Mark ha scritto:
Why does Excels SUMIF formula consider cells with text data such as:
2.1 and 2.10 as equal (it sums their values) when used in the range
and criteria?


Hi Mark,

because Excel treat as number text that can be treated as number, when you
use it in calculation.

So if you use a number formatted as text in a calculation, it will be
treated as a number.


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy


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
Sumif text is contained winthin a longer text string in a cell Johnny M[_2_] Excel Worksheet Functions 3 March 21st 07 02:50 PM
sumif with text? dj479794 Excel Discussion (Misc queries) 2 March 9th 07 04:41 PM
Excel Automatically Changing Decimals to Text as Default QueenOfStarwars Excel Discussion (Misc queries) 4 February 14th 07 05:50 AM
Pivot table formats text data with 2 decimals Don S Excel Discussion (Misc queries) 3 October 6th 05 12:45 AM
Removing leading decimals for text list Casey Excel Discussion (Misc queries) 3 September 28th 05 07:16 PM


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