Thread: How do I please
View Single Post
  #2   Report Post  
Steved
 
Posts: n/a
Default

Hello from Steved

Below is what I tried but is giving me a error 400
Thankyou.

Sub CopyData()

Dim LRow As Integer
Dim LColARange As String
Dim LContinue As Boolean

'Select Sheet1
Sheets("Data").Select
Range("Panmure").Select

'Initialize variables
LContinue = True
LRow = 2

'Loop through all column A values until a blank cell
is found or value does not
' match cell A2's value
While LContinue = True

LRow = LRow + 1
LColARange = "A" & CStr(LRow)

'Found a blank cell, do not continue
If Len(Range(LColARange).Value) = 0 Then
LContinue = False
End If

'Found first occurrence that did not match cell
A2's value, do not continue
If Range("Panmure").Value < Range
(LColARange).Value Then
LContinue = False
End If

Wend

'Copy data from columns A - C
Range("A2:E" & CStr(LRow - 1)).Select
Selection.Copy

'Paste results to cell A1 in Sheet2
Sheets("Panmure").Select
Range("A1").Select
ActiveSheet.Paste

MsgBox "Copy has completed."

End Sub


-----Original Message-----
Hello from Steved
Panmure 10903 27 54.04 200511
Panmure 10915 27 45.80 200511
Panmure 10913 24 43.80 200511
Panmure 10886 23 47.60 200511
Panmure 10922 21 41.47 200511
Panmure 10884 20 38.90 200511

The above is in sheet called Data

I've named 8 sheets with City names

The above is "Panmure" City what formula would I use

please
to copy from Data Sheet to the Panmure Sheet.

Thankyou.

.