View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
A.R.J Allan Jefferys
 
Posts: n/a
Default Active Cell Copy And Paste Sheet to Sheet

mudraker

You have hit it on the head, and i am greatful.
thankyou very much

Allan

"mudraker" wrote:


Allen

I hope I understand correctly what you are after

This macro uses the sheet.index function
I have assumed that you have your sheets in order from left (sheet1) to
right sheet31

Sub CopyRows()
If ActiveSheet.Index =1 Then Exit Sub
If ActiveCell.Row 60 Then Exit Sub
Sheets(ActiveSheet.Index - 1).Rows(ActiveCell.Row).Copy
ActiveSheet.Paste
End Sub

If they are in the reverse order then use

Sub CopyRows()
If ActiveSheet.Index =1 Then Exit Sub
If ActiveCell.Row 60 Then Exit Sub
Sheets(ActiveSheet.Index + 1).Rows(ActiveCell.Row).Copy
ActiveSheet.Paste
End Sub


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=537994