MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Aladin - More help needed on setting a dynamic range

Posted by Jason A on January 27, 2002 2:54 PM


Thanks for replying re settinga dynamic range from a text box, can you check my code as it doesn't work.

Thanks Jason

Dim Floorname As String

Posted by Ivan F Moala on January 27, 2002 3:12 PM

Check your sheet names.
Your code uses Sheet1 then names the
range as Room data this is OK IF Sheet1 is Room Data.........
ie. Sheet1 is the code name Room data is the Tab name that appears on the workbook.
To check have a look @ the Project explorer
if Room data is the same as Sheet1 then you should
Sheet1(Room data)

If NOT thenchange code to;

Sheets("Room Data").Names.Add Name:=Floorname, RefersToR1C1:= _



Posted by Aladin Akyurek on January 27, 2002 3:32 PM

If it's not the intention to restrict named range to a range in A which appears to be of numeric type, why not change the COUNT bit in the formula to: MATCH(9.99999999999999E+307,A:A) where you substitute the R1C1 specification?

Is this doable?