PDA

View Full Version : [SOLVED] How to Reference a String in a Cell



ronjon65
08-13-2018, 03:18 PM
Not sure that is the best subject, but this one is a bit odd.

In Cell A1, I have a string that is another cell, for example A1 has "C5" in it. I want to be able to reference the value that exists in "C5", but from A1. So it might look something like the following?

Sheet1.Range("string that is in A1")

Paul_Hossler
08-13-2018, 05:01 PM
Use =INDIRECT(A1)

Not sure what you mean by 'but from A1'



I want to be able to reference the value that exists in "C5", but from A1.

This is a worksheet approach. VBA would be slightly different




22710

ronjon65
08-13-2018, 05:48 PM
Great, thanks! I had never heard of "INDIRECT" before. After a search, I found this bit of code will do the trick. I figured there was a native way to do this.



Sheet1.Range(Sheet2.Range("A1").Value)