Hello VBA Gurus,
Newbie here. I've written this:
Sub CellBorders()
Range("A1:F216").Borders.LineStyle = xlContinuous
End Sub
It's obviously hard coded with a very specific range. However, what I'm struggling to figure out is a way to add cell borders to any range the sheet may have; for it to find the last row and the last column automatically and then add cell borders for that entire range. Does that make sense? I hope I asked the question properly.
In addition, someone in this forum helped me with this script:
Sub ChangeColor()
lRow = Range("A" & Rows.Count).End(xlUp).Row
Set MR = Range("A2:F2" & lRow)
For Each Cell In MR
If Cell.Value = "Hdr" Then Cell.EntireRow.Interior.ColorIndex = 15
Next
End Sub
However, similar to my first request, I'm struggling to figure out how to make it automatically end the highlighting at the last column. Hope my questions makes sense. If not, please let me know. Thank you in advance for those helping me! I truly appreciate the free advice/support/help.
Thanks,
Mills