Posted By: Anonymous
EXCEL VBA Question - 26/06/2018 12:16
Hi all,
I have data that I need to format using conditional formatting as part of an automated process.
I need to select all data in one column, but there are gaps in the data.
I have tried using the following code, but it just selects the entire column. I only want to go to the last row with data in it if that makes sense?
Current VBA code:
Sub trest()
Dim DataRange As Range
Set DataRange = Range("I1:I" & Cells.SpecialCells(xlCellTypeLastCell).Row)
DataRange.Select
End Sub
Anyone know how to correct this code?
I have data that I need to format using conditional formatting as part of an automated process.
I need to select all data in one column, but there are gaps in the data.
I have tried using the following code, but it just selects the entire column. I only want to go to the last row with data in it if that makes sense?
Current VBA code:
Sub trest()
Dim DataRange As Range
Set DataRange = Range("I1:I" & Cells.SpecialCells(xlCellTypeLastCell).Row)
DataRange.Select
End Sub
Anyone know how to correct this code?