ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with row selection. (https://www.excelbanter.com/excel-programming/314164-help-row-selection.html)

Drrott1[_5_]

Help with row selection.
 

Thank you all for the help. The macro is working now. The reason I ha
the MsgBox commands was for just Debugging. the counting loop I had pu
in works great but my problem was getting the result from those loops t
copy and paste. I was able to do it with

Rows (Ftime & ":" & Stime).copy

That copied all the rows between and I was then able to move them t
another spreadsheet. I still had trouble moving it to another sheet.
was trying

Sheet("sheet2").rows(1).paste

It did not work. I did find another way to do it however.

Thanks again for all your help

Craig Schellenbac

--
Drrott
-----------------------------------------------------------------------
Drrott1's Profile: http://www.excelforum.com/member.php...fo&userid=1546
View this thread: http://www.excelforum.com/showthread.php?threadid=27048


Don Guillett[_4_]

Help with row selection.
 
this would have worked. sheet needed the S and you needed to delete .paste
All one line or break with continuation _

Rows(ftime & ":" & stime).Copy _
Sheets("sheet2").Rows(1)

Sub copyrows()
ftime = 5
stime = 7
Rows(ftime & ":" & stime).Copy Sheets("sheet2").Rows(1)
End Sub

--
Don Guillett
SalesAid Software

"Drrott1" wrote in message
...

Thank you all for the help. The macro is working now. The reason I had
the MsgBox commands was for just Debugging. the counting loop I had put
in works great but my problem was getting the result from those loops to
copy and paste. I was able to do it with

Rows (Ftime & ":" & Stime).copy

That copied all the rows between and I was then able to move them to
another spreadsheet. I still had trouble moving it to another sheet. I
was trying

Sheet("sheet2").rows(1).paste

It did not work. I did find another way to do it however.

Thanks again for all your help

Craig Schellenbach


--
Drrott1
------------------------------------------------------------------------
Drrott1's Profile:

http://www.excelforum.com/member.php...o&userid=15460
View this thread: http://www.excelforum.com/showthread...hreadid=270489





All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com