Okay, so you need to both color the cell below and also, reselect the cells that the user selected before running the macro.
If so, give this a try:
Dim cel As Range Dim selectedRange As Range Dim preSelectedCells As String Set selectedRange = Application.Selection ' loop through the selected cells and fill the cells below it ' with a grey color For Each cel In selectedRange.Cells cel.Offset(1, 0).Interior.Color = RGB(220, 220, 220) ' keep a list of the cells the user had selected so they can be reselected preSelectedCells = preSelectedCells & cel.Address & "," Next cel ' move the trailing coma preSelectedCells = Left(preSelectedCells, Len(preSelectedCells) - 1) ' reselect the previously selected cells ActiveSheet.Range(preSelectedCells).Select




Reply With Quote
