Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Macro Syntax to copy and paste dynamic data based on one column

I am trying to move data around from one sheet to another I am currently
using the following:

Sub Quotesheet2()
'If each column has a heading, change the 1's to 2's
Dim myRange As Range
Dim ActSheet As Worksheet
Dim newSheet As Worksheet
Set ActSheet = ActiveSheet
With ActSheet
Set myRange = .Range("A1", .Range("A1").End(xlDown))
End With
Workbooks.Add
Set newSheet = ActiveWorkbook.Sheets("Sheet1") '<-- in the new workbook
myRange.Copy _
Destination:=newSheet.Range("C1")
With ActSheet
Set myRange = .Range("B1", .Range("B1").End(xlDown))
End With
myRange.Copy _
Destination:=newSheet.Range("C65536").End(xlUp).Of fset(1)
With ActSheet
Set myRange = .Range("c1", .Range("c1").End(xlDown))
End With
myRange.Copy _
Destination:=newSheet.Range("d1")
With ActSheet
Set myRange = .Range("d1", .Range("d1").End(xlDown))
End With
myRange.Copy _
Destination:=newSheet.Range("d65536").End(xlUp).Of fset(1)
End Sub


The problem that I am running into is that this data is changing constantly
and only one column has data that is consistently complete (column "A"). I
am looking for a way to look at column "A" and move data based on the
information in column "A" so for example if I have data in column "A"
(A1:A10). The macro will put the information from column "B" in column "C"
where column "A" left off. It then copies information in column "C" and
paste down. It then copies Column "D" and paste where column "C" left off
(but I am looking for a way where it will paste the same range as column "A").


Thank You in advance

Judd

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
macro to copy and paste based on a condition kathryn462 Excel Discussion (Misc queries) 5 October 14th 08 12:59 AM
Copy And Paste Macro Syntax Problem Minitman Excel Worksheet Functions 2 March 27th 08 01:59 AM
How do I change column data based on dynamic (rolling) dates? fergusbell Excel Discussion (Misc queries) 1 July 25th 06 10:29 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Copy/Paste Macro and Column Sizing JimK Excel Programming 2 August 27th 04 06:08 PM


All times are GMT +1. The time now is 05:56 PM.

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"