ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column searching using macro or VB (https://www.excelbanter.com/excel-programming/277752-column-searching-using-macro-vbulletin.html)

Tom Ogilvy

Column searching using macro or VB
 
You can get a list of unique entries using the Advanced filter and checking
the Unique only box. Turn on the macro recorder while you do it manually.
Then modify the code to make any modifications you need. you can then clear
the original, copy the uniques back on top, delete the uniques that you
copied.

--
Regards,
Tom Ogilvy



Richard Ruda wrote in message
...
We're pretty good at writing macros but not that good.
We a have columns containing duplicate information - for example:
A
A
A
C
C
F
F
F
F and so on
We're trying to write macro that will "simply" say; if a value in the
column exists then copy it to the next column, but only copy it once (we
only need to know if it appears once not x number of times in a column.

OR
goto the first cell; its value is "A" ; search the rest of the column for
"A" , delete all OTHER instances of "A" (but keep the first instance);

then
go to cell below that and do the same. The column can then be sorted to
produce this:
A
C
F and so on

Any assistance would be greatly appreciate
Thanks
Richard





Richard Ruda

Column searching using macro or VB
 
We're pretty good at writing macros but not that good.
We a have columns containing duplicate information - for example:
A
A
A
C
C
F
F
F
F and so on
We're trying to write macro that will "simply" say; if a value in the
column exists then copy it to the next column, but only copy it once (we
only need to know if it appears once not x number of times in a column. OR
goto the first cell; its value is "A" ; search the rest of the column for
"A" , delete all OTHER instances of "A" (but keep the first instance); then
go to cell below that and do the same. The column can then be sorted to
produce this:
A
C
F and so on

Any assistance would be greatly appreciate
Thanks
Richard



Richard Ruda

Column searching using macro or VB
 
Thanks - perfect




All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com