My problem is this. I need to create a VBA macro that will allow me to use Solver. On my spreadsheet I have an array that starts in b12 and will extend to ??15.
I have figured out how to find the number of columns used with:
What I can't do is figure out how to name this range so that I can reference it in the solver platform. I tried concatenate but VBA rejected my attempts.
If it goes for 8 columns it would be "B12:I15" but, the next time it might be 9 so then "B12:J15". I tried "B12:" & lngColumns & "15". I don't believe this worked because lngColumns is returning a number not a letter. I really don't know where to go from here as I have tried many different ways and am simply frustrated.
Bookmarks