Select & Copy Cells Between Two Names

Cagey93

New Member
Joined
Apr 17, 2019
Messages
34
hello,

I have had a look through quite a few posts but can't quite find what I'm after.

I need to use some VBA to select everything between "START-OF-DATA" and "END-OF-DATA"

These will constantly be moving when more rows are added in-between, but I don't want to have to keep changing the cell range manually.

This would be Select all cells between the above stated names from columns A:G

Any help would be appreciated and below is an example of what I mean.

Should state that those names are both in Column A always

START-OF-DATA
XS2297660586
0​
4​
AAA
30-Mar-21​
Aaa
30-Mar-21​
XS2206911526
0​
4​
AAA
31-Jul-20​
Aaa
31-Jul-20​
XS2347638574
0​
4​
AAA
25-Jun-21​
Aaa
25-Jun-21​
XS2526775775
0​
4​
AAA
22-Sep-22​
Aaa
22-Sep-22​
XS2510904324
0​
4​
AAA
04-Aug-22​
Aaa
04-Aug-22​
XS1791440859
0​
4​
AAA
16-Mar-18​
Aaa
16-Mar-18​
XS1725341041
0​
4​
AAA
25-Jan-18​
Aaa
25-Jan-18​
XS1759231522
0​
4​
AAA
04-May-22​
Aaa
01-Feb-18​
XS2101554819
0​
4​
AAA
30-Jan-20​
Aaa
30-Jan-20​
XS2473418973
0​
4​
AAA
04-May-22​
Aaa
04-May-22​
XS2541619263
0​
4​
AAA
02-Nov-22​
Aaa
02-Nov-22​
XS1770381215
0​
4​
AAA
21-Feb-18​
Aaa
21-Feb-18​
XS2434338351
0​
4​
AAA
31-Jan-22​
Aaa
31-Jan-22​
XS2080769909
0​
4​
AAA
25-Nov-19​
Aaa
21-Nov-19​
XS1979287437
0​
4​
AAA
09-Apr-19​
Aaa
09-Apr-19​
XS1996336357
0​
4​
AAA
20-May-19​
Aaa
16-May-19​
XS1806359714
0​
4​
AAA
13-Apr-18​
Aaa
09-Apr-18​
XS1996333925
0​
4​
AAA
20-May-19​
Aaa
15-May-19​
XS2115145406
0​
4​
AAA
12-Feb-20​
Aaa
12-Feb-20​
XS1729158508
0​
4​
N.A.N.A.Aaa
07-Dec-17​
XS1968589116
0​
4​
AAA
28-Mar-19​
Aaa
28-Mar-19​
XS1318364731
0​
4​
NR
10-Nov-22​
WR
10-Nov-22​
XS0731407655
0​
4​
AAA
20-Jan-12​
Aaa
21-Mar-14​
END-OF-DATA
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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