Moving thru sheets in Excel

J

john dawson

Hi I'm new to this community but use excel a lot. I'm stumped by this one
though : suppose I have column in one particular sheet with say all of the
names of the top footlball teams in individual cells in alphabetical order
down the column. I also, say, have another sheet in the same workbook with a
similar column of the same names but in this case it's their position in a
league . I would like a macro so that I can move the cursor on a team in my
first column, then cnrtl"x" and I move to the same team on my next sheet.

I can't work this one out to save my live so please help
 
S

Stefi

Do you mean that in the second sheet the ORDER of team names is their
position No?
Stefi


„john dawson†ezt írta:
 
S

Stefi

Hi,
In the second sheet are teams in different leagues mixed up, say

Celtic 1st (in the Scottish league)
Arsenal 1st (in the English league)
1st (in the Italian league)

If not, is the league the team belongs to marked in the first sheet, e.g.

Arsenal English
Celtic Scottish
Milan Italian

Stefi

„john dawson†ezt írta:
 
J

john dawson

Hi Stef,
Yes, the important thing here is that the ORDER of the teams is different on
the second sheet to on the first. After locating a particular team with the
cursor on the first sheet, what is the macro which will move the cursor to
the same team on the second sheet.

Your help would be much appreciated.
 
S

Stefi

Hi John,
This is the macro!

Sub Teamfind()
Dim keresrng As Range
csapat = ActiveCell.Value
Sheets("Position").Select <== Change Position to the actual name of
2.sheet!
Set keresrng = Range("A2:A65536")
Rows(WorksheetFunction.Match(csapat, keresrng, 0) + 1).Select
End Sub

Do you know how to assign hotkey ctrl+x?

Regards,
Stefi


„john dawson†ezt írta:
 
J

john dawson

Hi Stefi

This was just what I thought was an easy example of what I want to do.

Suppose Sheet 1 Column A has


Arsenal
Chelsea
Bolton
Everon
Liverpool
Manchester United

Their league positions are on Sheet2 column B

Chelsea
Manchester United
Arsenal
Bolton
Liverpool
Everton


Now suppose I'm in sheet 1 cell a1 - Arsenal - I want to be able to invoke a
macro to take me to sheet2 and the cell that is occupied by Arsenal which in
this case might be b3 - it might be a different cell next week so I need the
instruction to find the relevant cell in sheet2 that is occupied by arsenal.

Cheers

John
 
J

john dawson

Stefi

Sorry please disregard last post some confusion!!!

Many thanks for the macro - will let you know how i get on

cheers
 
S

Stefi

You are welcome! Thanks for the feedback!
Stefi


„john dawson†ezt írta:
 
Top