LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #21   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default this code is VERY slow, is it the code or perhaps a worksheet issue

On Monday, October 8, 2012 8:06:42 AM UTC-7, joeu2004 wrote:
Caveat.... I wrote:

Previously, you stated that you identify duplicates by


using an Excel 2010 Duplicate conditional format, then


manually marking "X" next to columns that are colored


(duplicates).




Pay close attention to the details of any proposed solution, especially

mine.



I just realized there are other interpretations of "move duplicates" that

would have very different results.



I could easily tweak my solutions to accommodate these other

interpretations. I just need to know precisely what your requirements are.



Let's do this by example. If the following examples are insufficient,

please embellish them with examples of your own.



(Sigh, I should have asked for this at the outset instead of making

assumptions.)



-----



Suppose your data are as follows:



E17: 3 F17: a

E18: 2 F18: b

E19: 1 F19: c

E20: 3 F20: a

E21: 1 F21: c



Which result do you want (if neither, what do you want)?





(1a) what my solutions create:



C17: 3 D17: a E17: 3 F17: a

C18: 1 D18: c E18: 2 F18: b

---- - ---- - E19: 1 F19: c



All duplicates __except__ the first appearance are moved to the left.





(1b) alternatively:



C17: 3 D17: a E17: 2 F17: b

C18: 3 D18: a

C19: 1 D19: c

C20: 1 D20: c



__All__ duplicates are moved to the left.





-----



And while we're at it, what defines a "duplicate"?



Suppose your data are as follows:



E17: 3 F17: a

E18: 2 F18: a

E19: 1 F19: b

E20: 3 F20: c

E21: 1 F21: b





(2a) what my solutions create:



C17: 1 D17: b E17: 3 F17: a

---- - ---- - E18: 2 F18: a

---- - ---- - E19: 1 E19: b

---- - ---- - E20: 3 F20: c



Duplicates based on __both__ columns E and F.





(2b) alternative:



C17: 3 D17: c E17: 3 F17: a

C18: 1 D18: b E18: 2 F18: a

---- - ---- - E19: 1 F19: b



Duplicates are based on column E only.





(2c) alternative:



C17: 2 D17: a E17: 3 F17: a

C18: 1 D18: b E18: 1 F18: b

---- - ---- - E19: 3 F19: c



Duplicates are based on column F only.





(2d) alternative:



C17: 2 D17: a E17: 3 F17: a

C18: 1 D18: b E18: 1 F18: b

C19: 3 D19: c



Duplicates are based on column E __or__ column F.


Hi joeu

Defining a duplicate. For my purpose the three XXOO in E17,18,19 are duplicates as are the two XOOX in E20, 21. Column F does not come into play determining a duplicate. (The XOOX in E22 & SEEK in F22 would be an outright typo mistake made during data entry. I believe we can disregard that entry, I show it only to eliminate it as being considered as a dupe in the solution process.)

Regarding vba case-sensitive, all data is upper case.

My "make-a-wish" ultimate solution would be this:
* E22 & F22 Not considered.

E F
17 XXOO YELL
18 XXOO TELL
19 XXOO LESS
20 XOOX KEEP
21 XOOX SEEK
22 XOOX SEEK*


A B C D E F
XXOO TELL XXOO LESS XXOO YELL
XOOX SEEK XOOX KEEP

Non-dupes remain in cols E & F.

Regards,
Howard
 
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
Fast code in 2003 = agonizingly slow code in 2007 XP Excel Programming 25 October 21st 08 01:01 PM
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does ker_01 Excel Programming 6 October 3rd 08 09:45 PM
Issue with code execution -- it is very slow robs3131 Excel Programming 7 June 8th 07 11:46 PM
Code issue - before_save() - Filename with date stamp - worksheet awrex Excel Programming 9 May 29th 07 10:16 PM
Slow code when used as VBA code instead of macro (copying visible columns) [email protected] Excel Programming 3 April 2nd 07 05:26 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"