View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default setup a range based on a variable

Hi
try
range(cells(1,1),cells(12,variable))

--
Regards
Frank Kabel
Frankfurt, Germany

"James New" schrieb im
Newsbeitrag ...
Hello Group

I am trying to set up a range in which I input a number
into a form, then the spreadsheet range will expand or
retract accordingly.
For instance if my range starts out at nothing and I input
a "10" into the range box, then I want the range to be
A1:J12. If I input a "5" into the same range box, then I
want the range to be A1:E12. Basically the A1 is a
constant and the 12 is a contant.
Thanks in advance,
James