I have an intermediate / high level knowledge in VBA, making a solution for a friend, I came across a problem that I could not find a solution for, I hope you can help me
I will summarize it in the simplest way possible
In cell a1 I have written the word VAR1
sub test ()
dim VAR1 as String
dim VAR2 as string
VAR1 = "Hello World"
VAR2 = FUNCTION_ WHAT_NECESSARY (range ("a1"). Value)
msgbox VAR2
'I need the result of VAR2 to be Hello World, that is, to look for the value that is stored' in the variable whose name is written in cell a1.
' when you run the macro it should have a result like the one in the image
end sub
I will summarize it in the simplest way possible
In cell a1 I have written the word VAR1
sub test ()
dim VAR1 as String
dim VAR2 as string
VAR1 = "Hello World"
VAR2 = FUNCTION_ WHAT_NECESSARY (range ("a1"). Value)
msgbox VAR2
'I need the result of VAR2 to be Hello World, that is, to look for the value that is stored' in the variable whose name is written in cell a1.
' when you run the macro it should have a result like the one in the image
end sub