Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Experts
What is wrong with the following line of code, it jsut wont except it. I am trying to set the range in sheet "Email_Control" The Range will be all cells in columns a:c with data in them. Worksheets("Email_Control").Range("A1:C& Cells (Rows.Count, 1).Name = "Email_Lookup_Table" TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Edgar,
Cells(Rows.Count, 1) will return the value in A65336 (or so). I think you want the last row, which is Cells(Rows.Count,"A").End(xlUp).Row -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Edgar" wrote in message ... Hi Experts What is wrong with the following line of code, it jsut wont except it. I am trying to set the range in sheet "Email_Control" The Range will be all cells in columns a:c with data in them. Worksheets("Email_Control").Range("A1:C& Cells (Rows.Count, 1).Name = "Email_Lookup_Table" TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You also have a syntax problem
Worksheets("Email_Control").Range("A1:C & _ Cells(Rows.Count, 1).End(xlup).Row).Name = "Email_Lookup_Table" -- Regards, Tom Ogilvy "Edgar" wrote in message ... Hi Experts What is wrong with the following line of code, it jsut wont except it. I am trying to set the range in sheet "Email_Control" The Range will be all cells in columns a:c with data in them. Worksheets("Email_Control").Range("A1:C& Cells (Rows.Count, 1).Name = "Email_Lookup_Table" TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Defining Range Name | Excel Discussion (Misc queries) | |||
help defining dynamic range | Charts and Charting in Excel | |||
Defining a range | Excel Worksheet Functions | |||
Defining a range | Excel Programming | |||
Defining Range | Excel Programming |