Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
range selection
Hi ,
"A:A, F:F, AC:AC". those 3 columns have a different numbers of rows in each file. let's say x identify the last row. how do I now select this range to apply a specific format. I though something like "A1:A" & x but this works only for one column. How do I select all ? thanks douvid |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
range selection
Hi Douvid,
Is this what you want? Dim sRange As String sRange = "A1:A" & Cells(Rows.Count, "A").End(xlUp).Row & "," & _ "F1:F" & Cells(Rows.Count, "F").End(xlUp).Row & "," & _ "AC1:AC" & Cells(Rows.Count, "AC").End(xlUp).Row Range(sRange).Select -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "douvid" wrote in message ... Hi , "A:A, F:F, AC:AC". those 3 columns have a different numbers of rows in each file. let's say x identify the last row. how do I now select this range to apply a specific format. I though something like "A1:A" & x but this works only for one column. How do I select all ? thanks douvid |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
range selection
one way:
With Range("A1:A" & x & ",F1:F" & x & ",AC1:AC" & x) .Interior.ColorIndex = 3 .NumberFormat = "@" .Font.ColorIndex = 6 End With In article , douvid wrote: Hi , "A:A, F:F, AC:AC". those 3 columns have a different numbers of rows in each file. let's say x identify the last row. how do I now select this range to apply a specific format. I though something like "A1:A" & x but this works only for one column. How do I select all ? thanks douvid |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA - Selection Instead of Range | Excel Discussion (Misc queries) | |||
Range selection | Excel Discussion (Misc queries) | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Range Selection | Excel Discussion (Misc queries) |