I need help converting a range to a usable string. I’m not 100% sure of what I need, because I have little VBA or VB.NET experience, but ultimately i want to take a bunch of cells like B32 to J52 and perform linest function on C–J (as y values) and B (as x value).
I think if I can learn to pop out a string that says "Bxx:Jyy" Then i’d be able to tell it do linest(Cxx:Cyy, Bxx:Byy, true, false).
Is there an easier way to do this? Anyway, all I have right now is some code to get the range from the user (just got it from Google). If someone could just help me get the string like stated above, I think I can manage the rest.
Dim oRangeSelected As Range
Set oRangeSelected = Application.InputBox("Please select a range of cells!", _
"SelectARAnge Demo", Selection.Address, , , , , 8)
In this case you want the user selected range (not pre-existing selection), so
[Update]
Actually, reading your question more closely, you can use ranges as is with LINEST, ie this sub gets a user range for X and Y and then feeds LINEST. The results are stored in an array, MyArr, which can be returned to the user.