Removing multiple lines based on first field
Removing multiple lines based on first field
(OP)
Hi
Can anyone help with a simple macro that will take 3 or 4 columns Excel files … and remove all the rows that has multiple first field. Example :
123, 34234, 2232,2233,
123, 43294, 3233, 32
124, 5442, 4445, 4332
124, 44432, 54322, 4333
124, 4345, 4344, 4332
125, 4343,43215, 4334,
125, 435, 3443, 4345
And return a file with only :
123, 34234, 2232,2233,
124, 5442, 4445, 4332
125, 4343,43215, 4334,
Etc….. I have files with 20000+ lines….
Much appreciated…
Can anyone help with a simple macro that will take 3 or 4 columns Excel files … and remove all the rows that has multiple first field. Example :
123, 34234, 2232,2233,
123, 43294, 3233, 32
124, 5442, 4445, 4332
124, 44432, 54322, 4333
124, 4345, 4344, 4332
125, 4343,43215, 4334,
125, 435, 3443, 4345
And return a file with only :
123, 34234, 2232,2233,
124, 5442, 4445, 4332
125, 4343,43215, 4334,
Etc….. I have files with 20000+ lines….
Much appreciated…





RE: Removing multiple lines based on first field
rather than write a macro (VBA code), how about using the Auto Filter capabilities within Excel. Include a label for each column (top row) and then select the Data, Filter, Auto Filter. You can then filter out repeated rows . . . perhaps writing a macro will be faster, but something for you to think about and attempt.
be sure all the data is continuous (no open rows between data) and the same for columns. If there are non-continuous rows/columns, then highlight all the data before executing the filter commands.
Good Luck!
-pmover
RE: Removing multiple lines based on first field
RE: Removing multiple lines based on first field
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.