0
votes

I have a Worksheet (MasterData) that contains the value "J" in cell B1. In cell C1, I have the value "10". With that information, I want to access another worksheets and get the value from cell J10. However I can't do something like:

myValue = Sheets("MySheet").Cells(Sheets("MasterData").Cells("B1").Value & Sheets("MasterData").Cells("C1").Value)

Any help would be appreciated. Thanks.

2

2 Answers

1
votes

Try

myValue = Sheets("MySheet").Range( _
       Sheets("MasterData").Range("B1").Value _
     & Sheets("MasterData").Range("C1").Value _
).Value
1
votes

Try
myValue = Sheets("AnotherSheet").Range(Sheets("MySheet").Cells(Sheets("MasterData").Cells("B1").Value & Sheets("MasterData").Cells("C1").Value))