
Highlighting a specific range
Here's one way:
Option Explicit
Sub testme3()
Dim rng As Range
Dim topcell As Range
Dim botcell As Range
With Worksheets("Sheet 1")
Set topcell = .Range("Iv2").End(xlToLeft)
Set botcell = .Cells(.Rows.Count, topcell.Column).End(xlUp)
Set rng = Range(topcell, botcell)
End With
rng.Select
End Sub
You could put all that stuff in one expression, but those long expressions
confuse me.
Quote:
> I have instructed my spreadsheet to find the top cell in the last column in
> Sheet 1, a Sheet to which columns are added on a daily basis with the
> following:
> Sheets("Sheet 1").Range("IV2").End(xlToLeft).Select
> How do I instruct it to highlight everything in this column downwards from
> this cell until it reaches the last cell in the column with anything in it
> -as this can change on a daily basis? Inotherwords, I don't want to
> highlight the entire column.
> Any ideas?
> Kind regards
> Michelle
--
Dave Peterson