Hi,
My macro searches for the lastrow in a usedrange and should change the cell properties of the cells in the last row of columns H and I. How do i write the range? Range("H" & LastRow: "I" & LastRow) won't work.
Hi,
My macro searches for the lastrow in a usedrange and should change the cell properties of the cells in the last row of columns H and I. How do i write the range? Range("H" & LastRow: "I" & LastRow) won't work.
MaartenRo,
Why not use Cells? Define "f" as Last row and
.range(.cells(f,8),.cells(f,9)) .(do whatever you want)
Ochimus
I like to use Cells when I have individual row and column values rather than concatenating them into the Range object... although if you prefer to stick with Range, you would do the same thing I show below (the Resize property)...
Cells(LastRow, "H").Resize(1, 2)
which will be the range consisting of Columns H and I on the row contained in the LastRow variable.
Last edited by Rick Rothstein; 01-20-2021 at 10:24 PM.
You sure that should be .Resize(0, 2)?
If the worksheet's UsedRange should determine the last row, then
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks