Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Help!! Copying/pasting

Hi,

I want to copy cells from a workbook ,which will vary in name, to another
workbook called "extraction_file". But the paste is uneven.

Source: worksheet = PayrollWorksheet
range = a2 through a46

Destination: worksheet = Payroll
range = a4, a11, a18 etc. increasing by 7 (days of the week)

So a2 would copy and paste to a4, a3 to a11, a4 to a18, etc.

There are several other cells to copy in the same manner but once I see the
methodology of the macro I can (hopefully) expand it to encompass the rest of
the job.

The macro I currently have is absurdly long and cumbersome and I'm hoping to
streamline it and learn better programming techniques.

Any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
KC KC is offline
external usenet poster
 
Posts: 55
Default Help!! Copying/pasting

Maybe

set rng=worksheets("Payrollworksheet").range("a2:a46")
i=0
for each c in rng
worksheets("Payroll").range("a" & 7*i+4)=c
i=i+1
next c

"Matt G" wrote in message
...
Hi,

I want to copy cells from a workbook ,which will vary in name, to another
workbook called "extraction_file". But the paste is uneven.

Source: worksheet = PayrollWorksheet
range = a2 through a46

Destination: worksheet = Payroll
range = a4, a11, a18 etc. increasing by 7 (days of the
week)

So a2 would copy and paste to a4, a3 to a11, a4 to a18, etc.

There are several other cells to copy in the same manner but once I see
the
methodology of the macro I can (hopefully) expand it to encompass the rest
of
the job.

The macro I currently have is absurdly long and cumbersome and I'm hoping
to
streamline it and learn better programming techniques.

Any help is appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help!! Copying/pasting

Send me the macro and I will help you streamline the code.

"Matt G" wrote:

Hi,

I want to copy cells from a workbook ,which will vary in name, to another
workbook called "extraction_file". But the paste is uneven.

Source: worksheet = PayrollWorksheet
range = a2 through a46

Destination: worksheet = Payroll
range = a4, a11, a18 etc. increasing by 7 (days of the week)

So a2 would copy and paste to a4, a3 to a11, a4 to a18, etc.

There are several other cells to copy in the same manner but once I see the
methodology of the macro I can (hopefully) expand it to encompass the rest of
the job.

The macro I currently have is absurdly long and cumbersome and I'm hoping to
streamline it and learn better programming techniques.

Any help is appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Help!! Copying/pasting

What is your email?

"Joel" wrote:

Send me the macro and I will help you streamline the code.

"Matt G" wrote:

Hi,

I want to copy cells from a workbook ,which will vary in name, to another
workbook called "extraction_file". But the paste is uneven.

Source: worksheet = PayrollWorksheet
range = a2 through a46

Destination: worksheet = Payroll
range = a4, a11, a18 etc. increasing by 7 (days of the week)

So a2 would copy and paste to a4, a3 to a11, a4 to a18, etc.

There are several other cells to copy in the same manner but once I see the
methodology of the macro I can (hopefully) expand it to encompass the rest of
the job.

The macro I currently have is absurdly long and cumbersome and I'm hoping to
streamline it and learn better programming techniques.

Any help is appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help!! Copying/pasting

joel dot warburg at itt dot com

"Matt G" wrote:

What is your email?

"Joel" wrote:

Send me the macro and I will help you streamline the code.

"Matt G" wrote:

Hi,

I want to copy cells from a workbook ,which will vary in name, to another
workbook called "extraction_file". But the paste is uneven.

Source: worksheet = PayrollWorksheet
range = a2 through a46

Destination: worksheet = Payroll
range = a4, a11, a18 etc. increasing by 7 (days of the week)

So a2 would copy and paste to a4, a3 to a11, a4 to a18, etc.

There are several other cells to copy in the same manner but once I see the
methodology of the macro I can (hopefully) expand it to encompass the rest of
the job.

The macro I currently have is absurdly long and cumbersome and I'm hoping to
streamline it and learn better programming techniques.

Any help is appreciated.

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
Copying and Pasting davew21 Excel Discussion (Misc queries) 1 March 31st 06 03:40 PM
Copying and pasting ??? NorcalTruck Excel Discussion (Misc queries) 3 December 27th 05 08:31 PM
Copying and Pasting Tia Excel Discussion (Misc queries) 4 June 6th 05 08:54 PM
Copying and pasting bambam77[_16_] Excel Programming 0 October 19th 04 06:29 PM
Copying & Pasting Michael[_10_] Excel Programming 1 August 28th 03 11:00 AM


All times are GMT +1. The time now is 02:40 AM.

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

About Us

"It's about Microsoft Excel"