Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default copy and paste to new sht in one col

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
For mycol = 3 To 33 Step
myval = Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Valu
If myval = "yes" The
Sheets(myst).Range("a1").Offset(myrow - 9, mycol - 3).Value = Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Valu
End I
Next myco
Next myro
End Su

Thanks
Rozb
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copy and paste to new sht in one col

Thank you Don
Will try it
Found a funny workaround by accident. and it works. Still trying to break it

Thanks again as always for you coaching

Public Sub CheckProductTypePaste(
mysl = "Select
myselt = "SelectSummary
CheckProductTypeProces
x =
For myrow = 11 To 15 Step
For mycol = 3 To 33 Step
myval = Sheets(mysl).Range("a1").Offset(myrow - 1, mycol - 1).Valu
If myval < isblank The
Sheets(myselt).Range("A" & x).Value = Sheets(mysl).Range("a1").Offset(myrow - 1, mycol - 1).Valu
End I
Application.CutCopyMode = Fals
x = x +
Next myco
Next myro
End Su

----- Don Guillett wrote: ----

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

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

x=sheets(myst).cells(rows.count,"a").end(xlup).row +
Sheets(myst).Range("a" & x).Valu
--
Don Guillet
SalesAid Softwar

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

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
For mycol = 3 To 33 Step
myval = Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Valu
If myval = "yes" The
Sheets(myst).Range("a1").Offset(myrow - 9, mycol - 3).Value

Sheets(mysf).Range("a1").Offset(myrow - 1, mycol - 1).Valu
End I
Next myco
Next myro
End Su
Thanks

Roz




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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy, paste without file name referenced after paste AusTexRich Excel Discussion (Misc queries) 6 September 23rd 08 02:57 AM
Copy; Paste; Paste Special are disabled Mack Neff[_3_] Excel Discussion (Misc queries) 0 April 28th 08 06:29 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM


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