ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Select range then copy rows macro (https://www.excelbanter.com/excel-discussion-misc-queries/245842-select-range-then-copy-rows-macro.html)

noggins

Select range then copy rows macro
 
Hi

I have a list of data and want a macro to identify groups of rows with
the same value in Col A, then select this range (Col A:C) and copy it
into a new sheet.

The receptors are grouped and will not be repeated later. There will
be thousands of receptors, therefore to make this run quickly i want
it to select group R1, and copy them. Then, i want to do R2, then R3
etc. Ideally the macro will remember how far down the list it had got
to and restart from that point.

See example below:

RcptNo LinkRef Distance
R1 1 10
R1 2 20
R1 3 30
R2 1 10
R2 2 30
R2 3 20
R3 1 10
R3 2 40
R3 4 100

All help much appreciated!

N

Don Guillett

Select range then copy rows macro
 
a looping macro using datafilterautofilterfilter by the groupcopy to
WHERE???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"noggins" wrote in message
...
Hi

I have a list of data and want a macro to identify groups of rows with
the same value in Col A, then select this range (Col A:C) and copy it
into a new sheet.

The receptors are grouped and will not be repeated later. There will
be thousands of receptors, therefore to make this run quickly i want
it to select group R1, and copy them. Then, i want to do R2, then R3
etc. Ideally the macro will remember how far down the list it had got
to and restart from that point.

See example below:

RcptNo LinkRef Distance
R1 1 10
R1 2 20
R1 3 30
R2 1 10
R2 2 30
R2 3 20
R3 1 10
R3 2 40
R3 4 100

All help much appreciated!

N




All times are GMT +1. The time now is 03:10 PM.

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