Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
My goal:
Range AP2:AX2 cells filled with green, grouped (merged) range of cells with a white border. Of the full range , AP2:AW2 hold a string value. AX2 is empty as a cell on its own.
This is the image.
Here is the code I am trying, which works except for excluding AX2 independent of the merged AP2:AW2.
Any suggestions what I can do to improve the code to achieve the result I desire?
Range AP2:AX2 cells filled with green, grouped (merged) range of cells with a white border. Of the full range , AP2:AW2 hold a string value. AX2 is empty as a cell on its own.
Data_Prep.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AP | AQ | AR | AS | AT | AU | AV | AW | AX | |||
2 | RMR Ï | 12:32:12 | |||||||||
GUI_1 |
This is the image.
Here is the code I am trying, which works except for excluding AX2 independent of the merged AP2:AW2.
Any suggestions what I can do to improve the code to achieve the result I desire?
Code:
With .Range("AP2:AX2")
.Merge
With .Borders
.LineStyle = xlContinuous
.Weight = xlThin
.Color = vbWhite
End With
.Interior.Color = RGB(0, 176, 80)
.Range("AP2:AW2").Merge
.Range("AP2").Value = st_cd
End With
.Range("AX2") = Format(Now, "h:mm:ss")