Simple Countif producing wrong results

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
857
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Would someone be able to diagnose why the below would yield bad results? If i do a simple excel E1 = E2 it says false. Yet the countif formula pairs them as a set? What am I not understanding? My dataset is very large. I got this formula from a prior thread Formula to match criteria. It should work in my perspective but doesn't and causing ton of false exceptions for me

Book2
ABCDEFG
1IdentifierOpen Date Cost Rounded to 2 For MatchingFormula
21234567899/20/2019$ 148.59501$ 148.6000012345678943728148.62
31234567899/20/2019$ 148.59000$ 148.5900012345678943728148.592FALSE
41234567892/7/2020$ 149.21500$ 149.2200012345678943868149.222
51234567892/7/2020$ 149.21000$ 149.2100012345678943868149.212FALSE
61234567894/11/2023$ 134.02000$ 134.0200012345678945027134.022
71234567894/11/2023$ 134.02000$ 134.0200012345678945027134.022TRUE
81234567894/12/2023$ 133.95000$ 133.9500012345678945028133.954
91234567894/12/2023$ 133.95000$ 133.9500012345678945028133.954TRUE
101234567894/12/2023$ 133.95000$ 133.9500012345678945028133.954
111234567894/12/2023$ 133.95000$ 133.9500012345678945028133.954TRUE
Sheet1
Cell Formulas
RangeFormula
D2:D11D2=ROUND(C2,2)
E2:E11E2=A2&B2&D2
F2:F11F2=COUNTIF($E$2:$E$11,$E$2:$E$11)
G3,G11,G9,G7,G5G3=E2=E3
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
COUNTIF only uses the first 15 digits, anything else is converted to 0. Try add a hyphen in front.
Excel Formula:
=COUNTIF($E$2:$E$11,CHAR(173)&E2)
 
Upvote 0
Solution
Oh I did not know that. what is CHAR doing forcing it to a string? Hyphen also worked. This also worked too =A2&B2&D2&Char(160)
 
Upvote 0
Also this cut my formula calculation time by 50%, why is that so? Before it took 7min to calculate 1mil rows with that formula now with that hyphen its down to 3mins.
 
Upvote 0
I don't know why it would cut down the time. Maybe others have an idea.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,629
Members
452,661
Latest member
Nonhle

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