I'm creating a process for a group of users and want to make it user-friendly, and I already have an existing Macro which performs about 35 steps. I want to add one last step that applies a thin-line bottom border to certain cells in a range, and based upon a formula.
The conditional formatting can be applied/stored in any cell in row 2 such as A2, B2, D2, etc. and the formula is as follows: =COUNTIF($A1, "*Match*")
and the range in which to apply the bottom border is: =$A$2:$BG$5000
I believe the below code is a pretty good start, but I need help defining it correctly. Thank you so much.
Sub VBA_borders()
Dim iRange as Range
Dim iCells as Range
Set iRange = ThisWorkbook.ActiveSheet.UsedRange
For each iCells in iRange
If Not isEmpty(iCells) Then
Borders:=x1EdgeBottom, _
LineStyle:=x1Continuous, _
Weight:=x1Thin, _
ColorIndex:=x1Automatic
thanks,
David
The conditional formatting can be applied/stored in any cell in row 2 such as A2, B2, D2, etc. and the formula is as follows: =COUNTIF($A1, "*Match*")
and the range in which to apply the bottom border is: =$A$2:$BG$5000
I believe the below code is a pretty good start, but I need help defining it correctly. Thank you so much.
Sub VBA_borders()
Dim iRange as Range
Dim iCells as Range
Set iRange = ThisWorkbook.ActiveSheet.UsedRange
For each iCells in iRange
If Not isEmpty(iCells) Then
Borders:=x1EdgeBottom, _
LineStyle:=x1Continuous, _
Weight:=x1Thin, _
ColorIndex:=x1Automatic
thanks,
David