Re: $$Excel-Macros$$ VBA for Dynamic Range

2013-05-20 Thread Anoop K Sharma
It's working fine at my end, yet you can change the line from "RefersToR1C1" to "RefersTo" as below ActiveWorkbook.Names.Add Name:=sName, RefersTo:= _ "=OFFSET(" & Sht & "!R2C" & Col & ",0,0,COUNTA(" & Sht & "!C" & Col & ")-1," & ColCount & ")" On Fri, May 17, 2013 at 7:50 AM, Cab Boose

$$Excel-Macros$$ VBA for Dynamic Range

2013-05-16 Thread Cab Boose
Hi Have this macro to take the See code below. Comes up with compile error on the last row: ActiveWorkbook.. Is it something to do in not having the sheet name ? If so it would have to be taken from the tab. (I now see it is referenced as sht.) or Is it something to do with the R1C1 re