I wrote the following code to get data from one sheet to another. On the destination sheet I want to choose the next available blank cell to put the data into.
Sheets("Newdata".Select
Range("A1".Select
Cells.Find(What:="The Data.", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Set myrange = ActiveCell
myrange.Offset(1, 1).Select
Set myrange = ActiveCell
myrange.Resize(2, 1).Select
Selection.Copy
Sheets("Net FFS".Select
Range("A3".Select
Do Until ActiveCell.Text = ""
Set myrange = ActiveCell
myrange.Offset(0, 1).Select
Loop
Selection.PasteSpecial _
Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
This works great until I hide the first few columns that already have data in. When the columns are hidden, the data gets put into the first available cell, not the first available blank cell. Why would that happen?? (and how can I stop it?)
Thanks,
Andrea
Sheets("Newdata".Select
Range("A1".Select
Cells.Find(What:="The Data.", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Set myrange = ActiveCell
myrange.Offset(1, 1).Select
Set myrange = ActiveCell
myrange.Resize(2, 1).Select
Selection.Copy
Sheets("Net FFS".Select
Range("A3".Select
Do Until ActiveCell.Text = ""
Set myrange = ActiveCell
myrange.Offset(0, 1).Select
Loop
Selection.PasteSpecial _
Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
This works great until I hide the first few columns that already have data in. When the columns are hidden, the data gets put into the first available cell, not the first available blank cell. Why would that happen?? (and how can I stop it?)
Thanks,
Andrea