Mark for Deletion

amerifax

Board Regular
Joined
Dec 17, 2008
Messages
247
I have two combining files that can be controlled by the field "YR_Q". The top 70% of records are "YR_Q" 11.3. The balance of the records are "YR_Q" 4.3. Iuse the following code to eliminate duplications between the two record types, based on YR_Q", 11.3 & 4.3.

=IF(COUNTIF(B:B,B6)>1,"X","")

Dad worked good sense. The two record sets had no all duplicate records. When looking at each set separately. The duplications occurred between the two sets and were indicated with the "X".

Now my requirement has changed a bit. the records that contain "11.3". Have many duplications within that record set. I have no need to indicate the duplications that occur in this set. My condition is this: I need to mark, the lower set (4.3) for every record that has a duplicate record amongst the "11.3" records. The column B:B is the address field that contains the information that will contain the information to determine the duplication.

When I mentioned record sets. It is to tables imported into the same spreadsheet with two important fields.
B:B ADDR - address to determine duplication
X:X YR-Q - to determine record sets

I hope I've explained myself better than I have in the past.Thanks for taking the time to read this.
Bob

SideBar: some people have mentioned the fact that Excel might choke on the above calculation based on 200,000 records. I just wanted to pass on my experience with length of time it took. Approximately 4 hours.

But same formula used with 1,0109,000 started running yesterday at 4:00pm , and today at 6:35pm is that 69%. Time is extreme but not at all when I think of the alternative checking a sorted database three or four records at a time.
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try something like this...

=IF(X6=4.3, IF(COUNTIFS(B:B,B6,X:X,11.3)>0,"X",""))

If the value in X6 is 4.6 then IF there is a value in columns B and X equal to B6 and 11.3 then return a "X".

If you think it was slow before...
 
Last edited:
Upvote 0
>>AlphaFrog<<
Just completed the clean up. The formula worked great. It also was reasonably fast.
Thanks
Bob
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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