Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default COPY DATA IN SPECIFIC WAY

Hi, I want macro which should copy data from Sheet1 to Sheet2 in
specific way (see below)

Copy Sheet1 Cell A3 value to Sheet2 Cell A10
Copy Sheet1 Cell A4 value to Sheet2 Cell A13
Copy Sheet1 Cell A5 value to Sheet2 Cell A16
Copy Sheet1 Cell A5 value to Sheet2 Cell A19
and so on ….. till Sheet1 Cell A40

Macro should copy all data from Sheet1 Range("A3:A40") to Sheet2 but
it should paste each cell value of Sheet1 to two cells below of first
cell of Sheet2 as mentioned above. Please can any friend help me on
this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default COPY DATA IN SPECIFIC WAY

Hi,


Please use the below mentioned macro but you have to put "End" in the
Cell A41 of Sheet1 otherwise the macro will go in never ending loop.


Sub Paste()
Sheets("Sheet1").Select
Range("A3").Select
Sheets("Sheet2").Select
Range("A10").Select
ActiveSheet.Previous.Select

Do Until ActiveCell.Value = "End"
ActiveCell.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveSheet.Previous.Select
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
ActiveCell.Copy
ActiveSheet.Next.Select
ActiveCell.Offset(3, 0).Range("A1").Select
ActiveSheet.Previous.Select
Loop
Application.CutCopyMode = False

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default COPY DATA IN SPECIFIC WAY

On Aug 22, 2:01*pm, "Don Guillett" wrote:
Modify ranges to suit. Pls don't type in ALL CAPS.

Sub copycellstoaltrows()
For i = 3 To 8
Cells(i, "a").Copy Cells(3 * i, "b")
Next i
Cells(9, "b").Insert Shift:=xlDown
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"K" wrote in message

...
Hi, *I want macro which should copy data from Sheet1 to Sheet2 in
specific way (see below)

Copy Sheet1 Cell A3 value to Sheet2 Cell A10
Copy Sheet1 Cell A4 value to Sheet2 Cell A13
Copy Sheet1 Cell A5 value to Sheet2 Cell A16
Copy Sheet1 Cell A5 value to Sheet2 Cell A19
and so on ….. till Sheet1 Cell A40

Macro should copy all data from Sheet1 Range("A3:A40") to Sheet2 but
it should paste each cell value of Sheet1 to two cells below of first
cell of Sheet2 as mentioned above. *Please can any friend help me on
this.


Thanks guies for your help. I liked Don's code as its small. Don i
have amended your code (see below)

Sub copycellstoaltrows()
For i = 3 To 42
Cells(i, "A").Copy Cells(3 * i + 1, "C")
Next i
End Sub

This is what i needed. can i ask that what you mean by "Pls don't
type in ALL CAPS" ?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default COPY DATA IN SPECIFIC WAY


Typing in all caps is considered to be shouting and frowned upon.
Also, most of us TOP post for ease in readability.
Thank you for your cooperation.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"K" wrote in message
...
On Aug 22, 2:01 pm, "Don Guillett" wrote:
Modify ranges to suit. Pls don't type in ALL CAPS.

Sub copycellstoaltrows()
For i = 3 To 8
Cells(i, "a").Copy Cells(3 * i, "b")
Next i
Cells(9, "b").Insert Shift:=xlDown
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"K" wrote in message

...
Hi, I want macro which should copy data from Sheet1 to Sheet2 in
specific way (see below)

Copy Sheet1 Cell A3 value to Sheet2 Cell A10
Copy Sheet1 Cell A4 value to Sheet2 Cell A13
Copy Sheet1 Cell A5 value to Sheet2 Cell A16
Copy Sheet1 Cell A5 value to Sheet2 Cell A19
and so on ….. till Sheet1 Cell A40

Macro should copy all data from Sheet1 Range("A3:A40") to Sheet2 but
it should paste each cell value of Sheet1 to two cells below of first
cell of Sheet2 as mentioned above. Please can any friend help me on
this.


Thanks guies for your help. I liked Don's code as its small. Don i
have amended your code (see below)

Sub copycellstoaltrows()
For i = 3 To 42
Cells(i, "A").Copy Cells(3 * i + 1, "C")
Next i
End Sub

This is what i needed. can i ask that what you mean by "Pls don't
type in ALL CAPS" ?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default COPY DATA IN SPECIFIC WAY

This is what i needed. can i ask that what you mean
by "Pls don't type in ALL CAPS" ?


Your subject line was typed in "all caps" (short for "all capitalized
letters")... text typed in all upper case letters is harder to read than
normal cased letters (it really is annoying to read) and it is also
considered the written equivalent of shouting.

Rick

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
Copy data to a specific row smith82 New Users to Excel 0 February 15th 11 04:12 PM
Copy Specific Data Chersie Excel Programming 4 June 1st 08 10:22 AM
Copy specific data over to other worksheet dd Excel Programming 1 December 19th 06 09:24 AM
Copy and Paste specific data lizb22 Excel Programming 1 July 10th 06 09:28 PM
copy/print specific data Anthony Excel Worksheet Functions 3 January 26th 05 10:47 PM


All times are GMT +1. The time now is 12:33 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"