Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Counting entries and copying

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pcor - 19 Mar 2007 15:30 GMT
I have a number of entries in Col A & B
The number varies, could be 100 and it could increase
I would like to have a macro that would copy these entries as follows:
Lets assume that I have 100 entries in A & B-Starting at A1 & B1
I want to leave the first 25 where they are
Then take entries 25 to 50 and COPY them to col d & E(starting at D1 & E1)
Then take the next quarter (51 to 75) and COPY them to col G & H
Then copy the last quarter to Col J & K
Thanks for the help
Gary''s Student - 19 Mar 2007 16:02 GMT
Sub pcor()
Set r1 = Range("A25:B50")
Set r2 = Range("A51:B75")
Set r3 = Range("A76:B100")
Set r1d = Range("D1")
Set r2d = Range("G1")
Set r3d = Range("J1")
r1.Copy r1d
r2.Copy r2d
r3.Copy r3d
End Sub

Signature

Gary''s Student
gsnu200711

> I have a number of entries in Col A & B
> The number varies, could be 100 and it could increase
[quoted text clipped - 5 lines]
> Then copy the last quarter to Col J & K
> Thanks for the help
pcor - 19 Mar 2007 16:33 GMT
That would only work if col a & B contained exactly 100 entries. As I said
before the number of entries in Col A & A will vary from 80 to 200 on a
regular basis
But thanks for the help. much appreciated

> Sub pcor()
> Set r1 = Range("A25:B50")
[quoted text clipped - 17 lines]
> > Then copy the last quarter to Col J & K
> > Thanks for the help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.