Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Day, I have to name a range and it can vary, dependant on the
spreadsheet recieved and the amount od data but all the used area will be the range name KTL. At this point in time it is A1:CQ847 This could go to CQ5000 Could somebody help me with some code please. Thanks in advance Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() set myRange = Range("A1:C" & cells(rows.count,"C").end(xlup).row) -- HTH RP (remove nothere from the email address if mailing direct) "Tempy" wrote in message ... Good Day, I have to name a range and it can vary, dependant on the spreadsheet recieved and the amount od data but all the used area will be the range name KTL. At this point in time it is A1:CQ847 This could go to CQ5000 Could somebody help me with some code please. Thanks in advance Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You mean like Insert=Name=Define kind of name a range?
ActiveSheet.UsedRange = "KTL" -- Regards, Tom Ogilvy "Tempy" wrote in message ... Good Day, I have to name a range and it can vary, dependant on the spreadsheet recieved and the amount od data but all the used area will be the range name KTL. At this point in time it is A1:CQ847 This could go to CQ5000 Could somebody help me with some code please. Thanks in advance Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bob, but i need to test the range and then name it as KTL, as the
range is not fixed but varying. I tried this but it name it from A1:C847, but the width or number of columns can also vary. Thanks Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom, I need to name the used range as KTL but it can vary.
Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A1:C" & cells(rows.count,"C").end(xlup).row).Name = "KTL"
-- HTH Bob Phillips "Tempy" wrote in message ... Thanks Bob, but i need to test the range and then name it as KTL, as the range is not fixed but varying. I tried this but it name it from A1:C847, but the width or number of columns can also vary. Thanks Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is that statement supposed to mean?
-- Regards, Tom Ogilvy "Tempy" wrote in message ... Hi Tom, I need to name the used range as KTL but it can vary. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
VBA setting Range | Excel Discussion (Misc queries) | |||
Setting a Range | Excel Programming | |||
range setting | Excel Programming | |||
Setting a range using VBA | Excel Programming |