CountIF Code slowing down sheet.

Kiloelectronvolt

Board Regular
Joined
Oct 5, 2015
Messages
81
Office Version
  1. 365
Platform
  1. Windows
Hi All!!

I am running this CountIf formula to try and detect any duplicate entries. IF columns B, C, and E are all the same on any rows above, I want it to turn the text RED to let me know that row has been entered above and is a duplicate.

However, this conditional formatting code has single handidly taken my spreadsheet down to a crawl. (unusable) -- The second I remove this formatting, the sheet works fine! is there a better way to do this? Thank you!!


Code:
=COUNTIFS($B:$B,$B1,$C:$C,C1,$E:$E,E1)>1
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Limit the ranges being used in the formula & also in the "Applies to" range
 
Upvote 0
Limit the ranges being used in the formula & also in the "Applies to" range

I used this and it seems to be working much better. However, if I enter a dupliacte row, it only turns all the above rows red, and not the row I just typed in. thank you!


=COUNTIFS($B1:$B2000,$B1,$C1:$C2000,C1,$E1:$E2000,E1)>1
 
Upvote 0
Try anchoring the ranges
=COUNTIFS($B$1:$B$2000,$B1,$C$1:$C$2000,$C1,$E$1:$E$2000,$E1)>1
 
Upvote 0
Fluff! Thank you!!!!!!!!!!!!!!!!!!

This is a very important document to me and this function was necessary. I appreciate you and this message board greatly. I spend hours trying on my own, but when I get stuck you all always have the answers.
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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