View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default copy and paste to new sht in one col

first just try removing the offset. But, that will always be cell A1. So
where in col A do you want it? If the next avail row then you have to
qualify it.
Sheets(myst).Range("a1").Offset(myrow - 9, mycol - 3).Value

Sheets(myst).Range("a1").Value

x=sheets(myst).cells(rows.count,"a").end(xlup).row +1
Sheets(myst).Range("a" & x).Value
--
Don Guillett
SalesAid Software

"rozb" wrote in message
...
The below listed code :
sheet1 macro copies from one sheet and then paste exact on sheet2 by

column.
How can I force the paste action to be in col A? each paste in col A?

Sub aaaaa()
mysf = "xxx"
myst = "yyyyy"
For myrow = 11 To 15 Step 1
For mycol = 3 To 33 Step 1
myval = Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Value
If myval = "yes" Then
Sheets(myst).Range("a1").Offset(myrow - 9, mycol - 3).Value =

Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Value
End If
Next mycol
Next myrow
End Sub

Thanks,
Rozb