Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
In order to select an area limited by the number of rows in column A that contain data in them I was provided with the following code: Sub Select_area() Dim LastRowUsed As Integer Dim rngToCopy As Range LastRowUsed = Range("A" & Rows.Count).End(xlUp).Row Set rngToCopy = "A1:U" & LastRowUsed End Sub However, when I run this I get a compelation error: type mismatch and the debugger highlights the & in the Set rngToCopy instruction which I read as concatinating the number returned with the U to create a range. Can anyone explain why this has failed and more importantly how to fix it? As always thanks for any help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Concatination | Excel Discussion (Misc queries) | |||
Problem with concatination result. Last digit change to 0 | Excel Worksheet Functions | |||
How set a format on one of more strings in a concatination | Excel Discussion (Misc queries) | |||
concatination of cell contents | Excel Programming | |||
Excal Concatination of cells that are not empty | Excel Worksheet Functions |