#1   Report Post  
Steved
 
Posts: n/a
Default How do I please

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.

  #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.

.

  #3   Report Post  
Max
 
Posts: n/a
Default

Perhaps you'd like to try a formulas approach which closely fits what you
seem to be after? If so, think you could adapt quite easily the set-up
described in this recent post: http://tinyurl.com/5ejr2

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Steved" wrote in 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.



  #4   Report Post  
Steved
 
Posts: n/a
Default

Thankyou=20
-----Original Message-----
Perhaps you'd like to try a formulas approach which=20

closely fits what you
seem to be after? If so, think you could adapt quite=20

easily the set-up
described in this recent post: http://tinyurl.com/5ejr2

--
Rgds
Max
xl 97
---
GMT+8, 1=B0 22' N 103=B0 45' E
xdemechanik <atyahoo<dotcom
----
"Steved" wrote in=20

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=20

please
to copy from Data Sheet to the Panmure Sheet.

Thankyou.



.

  #5   Report Post  
Max
 
Posts: n/a
Default

You're welcome !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Steved" wrote in message
...
Thankyou


Reply
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



All times are GMT +1. The time now is 08:41 PM.

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

About Us

"It's about Microsoft Excel"