if statement is true, copy data to another location

J

janco tianno

Hi

I am looking to set up a football spreadsheet for the coming season,
however my excel knowledge could be better.

Basically I want to copy and paste (from a website) the results into
an excel worksheet. I want excel to automatically read the text and
provide the relevant data for the selected team (from another
location). I then want to be able to fill in the scores and have this
information update automatically on all relevant worksheets.

I have attempted an ‘IF’ statement however I could not get
it to work. I have also tried various sorting techniques and macros
but these require updating manually

The basis of the ‘IF’ statement is as follows:
Eg if cell a1 = arsenal then b1 to b5 is equal to copy
worksheetArsenal b1:b5
Eg if cell a1 = birmingham then b1 to b5 is equal to
worksheetBirmingham b1:b5

There will be 20+ teams therefore im not even sure that an IF
statement is the answer to my problems. If anyone could provide the
answer or direct me as to where I can learn the correct techniques, I
would be most grateful.

Many thanks
 
B

Bob Phillips

How about

If Range("A1").Value <> "" Then
Worksheets(Range("A1").Value).Range("B1:B5").Copy _
Destination:=Range("B1:B5")
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
L

Lakeuk

Hi
I am looking to set up a football spreadsheet for the coming season,
however my excel knowledge could be better.

Basically I want to copy and paste (from a website) the results into
an excel worksheet. I want excel to automatically read the text and
provide the relevant data for the selected team (from another
location). I then want to be able to fill in the scores and have this
information update automatically on all relevant worksheets.

I have attempted an ‘IF’ statement however I could not get
it to work. I have also tried various sorting techniques and macros
but these require updating manually

The basis of the ‘IF’ statement is as follows:
Eg if cell a1 = arsenal then b1 to b5 is equal to copy
worksheetArsenal b1:b5
Eg if cell a1 = birmingham then b1 to b5 is equal to
worksheetBirmingham b1:b5

There will be 20+ teams therefore im not even sure that an IF
statement is the answer to my problems. If anyone could provide the
answer or direct me as to where I can learn the correct techniques, I
would be most grateful.

Many thanks


A charts available at http://www.winsite.com/search/

search for football

Dave
 
Top