LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Difficult Loop

The following code copies only one line from Sheet2 to Sheet1.
How can you loop the macro to copy all data in Sheet2 to Sheet1?

What the Macro does is copies Date and 7 numbers to Sheet1. The seven
numbers are any numbers to 39 in any order. Arranged to Column Number
such as Col. 'B' would have number 1; Col. 'K' would have number 10;
and so on to number 39 Col. 'AN'.

The problem is looping thur these data rows on Sheet2.
And not just copying one row.
Any Help would be Appreciated
With Thanks

Sub Newer()
Dim rCell As Range
With Sheet1.Range("A2") 'Header row has description row one
For Each rCell In Sheet2.Range("A1:H1")
If IsDate(rCell.Value) Then
'MsgBox rCell.Address & " has " & rCell & " in it" 'Testing
.Value = Sheet2.Range("A1")
Else
.Offset(0, rCell.Value).Value = rCell.Value
End If
Next rCell
End With

End Sub

 
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
Help, too difficult for me. Menno Excel Worksheet Functions 4 January 19th 06 01:53 PM
Difficult but do-able? Jaydubs Excel Discussion (Misc queries) 8 October 6th 05 11:01 AM
Is this difficult??? mingolo Excel Programming 1 September 15th 05 07:03 PM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"