countif question

andonny

Board Regular
Joined
Mar 11, 2002
Messages
220
Hi,
I use the countif function and it tells me that in text cells those two are the same. The result is two.
Why is that.

30017
000000000000030017

Thank you for your help
Andonny
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Excel views 30017 and 00000000030017 both as the number 30017, so, it counts two.

If you use "real" text, such as a10017 and a0000010017, it will see this as two, distinct texts.
 
Upvote 0
andonny

You have the answer as to why. Here is one alternative if it is of any use.

Column A is formatted as text.
B1: =SUMPRODUCT(--(A1:A10=A1))
or
B2: =SUMPRODUCT(--(A1:A10="3017"))
Mr Excel.xls
ABCD
130173
200030173
3569
43017
589
603017
71
8256
93017
1000003017
11
Sheet1
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top