View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claud Balls Claud Balls is offline
external usenet poster
 
Posts: 72
Default Macro to copy cell from one worksheet to another

Option Explicit
Sub Macro1()
Dim iNumRows As Integer, iNumCol As Integer, r As Integer, c As Integer
iNumRows = Sheets("data").UsedRange.Rows.Count
iNumCol = Sheets("data").UsedRange.Columns.Count
For r = 1 To iNumRows
For c = 1 To iNumCol
Sheets("result").Cells(c, r) = Sheets("data").Cells(r, c)
Next
Next

End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!