biafra
03-19-2003, 05:57 AM
Can anyone tell me: how does Excel macro know the beginning and ending row number of the range user selected?
(I'm writing a macro that formats every other unequal cell in a range of cells that user selected in a worksheet. The contiguous cells that have same values should be contiguously formated or contiguously not formated)
I tried Selection.End(xlUp).row i .End(xlDown).row, but they don't work in this case, since I want to limit the formating only to user's selected range, not to format entire row of data.
Is there some other Selection.attribute?
(I'm writing a macro that formats every other unequal cell in a range of cells that user selected in a worksheet. The contiguous cells that have same values should be contiguously formated or contiguously not formated)
I tried Selection.End(xlUp).row i .End(xlDown).row, but they don't work in this case, since I want to limit the formating only to user's selected range, not to format entire row of data.
Is there some other Selection.attribute?