Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Counting entries and copying

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


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Counting entries and copying

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

--
Gary''s Student
gsnu200711


"pcor" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Counting entries and copying

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


"Gary''s Student" wrote:

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

--
Gary''s Student
gsnu200711


"pcor" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting entries Dos Equis Excel Worksheet Functions 4 November 20th 06 03:24 AM
Counting Duplicate Entries No_name Excel Worksheet Functions 1 July 18th 05 04:01 PM
Counting Entries Jimbo Excel Worksheet Functions 6 April 29th 05 08:27 PM
Counting Entries in a Cell Sh0t2bts Excel Worksheet Functions 0 February 15th 05 10:08 AM
counting entries between two dates? Todd Excel Worksheet Functions 7 November 1st 04 11:07 PM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"