bluefeather8989
Active Member
- Joined
- Nov 20, 2009
- Messages
- 325
- Office Version
- 365
- Platform
- Windows
I need a macro to select the value in sheets (Score F6:F51) that matches the same number from sheets (Scoreboard AA10).
I'm sorry it was very late when i wrote this but i need it to select the cell not the address. can you plz rewrite this?Code:MsgBox Sheets("Sheet1").Range("F6:F51").Find(Sheets("Sheet2").Range("AA10"), , , 1).Address
Application.Goto Sheets("Sheet1").Range("F6:F51").Find(Sheets("Sheet2").Range("AA10"), Sheets("Sheet1").Range("F51"), , 1), True
For futre referenc this code will only work if Sheets("Sheet1") is selected. I had to add Sheets("Sheet1").Select code above this code. It works fine for me.VBA Code:Application.Goto Sheets("Sheet1").Range("F6:F51").Find(Sheets("Sheet2").Range("AA10"), Sheets("Sheet1").Range("F51"), , 1), True
Please note it will error if the search term isn't in the range
The sheet does NOT need selecting for that code (it needs no selecting of the sheet or the cell, it goes there as is), if are using Select then the sheet does need activating/selecting so justFor futre referenc this code will only work if Sheets("Sheet1") is selected. I had to add Sheets("Sheet1").Select code above this code. It works fine for me.
Sheets("Sheet1").Activate
Range("F6:F51").Find(Sheets("Sheet2").Range("AA10"), Range("F51"), , 1).Select