Dynamic ranges
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).Offset(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).Offset(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").
Thanks in advance,
Judd
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735