I know this is a very unusual question, it will probably not make sense to you why I want to do this but...
This happens if the value in cell A1 is 5:
Myfunction(A1): outputs 5
In vba module:
Function Test(array As String)
Test=array
End function
Examples of what I want:
Myfunction(A1): outputs string "A1"
Or
Myfunction(A1:B3): outputs string "A1:B3"
Or
Myfunction(A1:B3 & B5:B9): outputs string "A1:B3 & B5:B9"
How do I get the vba function to do this. Basically I want the function to store the cell address as a string and not the values located at the cell address locations. I know you can use "A1:A4" when you enter the values into the function or something along those lines but that's not what I'm looking for. Also this is for a function not a sub.