Hello klotzy,
Welcome to the Forum!
I don't think conditional formatting is a good option for you. If you will have many packing slips per page and they will go across as well as down the sheet then conditional formatting would not be a good choice.
Here is a VBA macro that will find each packing slip on the sheet and add the borders to only the cells that need them. This has been added to the attached workbook. There is button on the sheet to run the macro.
Sub BorderAround()
Dim Cell As Range
Dim Rng As Range
Dim Row As Long
Dim Start As String
Dim Wks As Worksheet
Set Wks = ActiveSheet
Set Cell = Wks.Cells.Find("Packing Slip", , xlValues, xlWhole, xlByRows, xlNext, False, False, False)
If Cell Is Nothing Then Exit Sub
Start = Cell.Address
Do
Set Rng = Cell.CurrentRegion
Set Cell = Wks.Cells.FindNext(Cell)
For Row = 4 To Rng.Rows.Count
If Rng.Cells(Row, "D") > 0 Then
Rng.Rows(Row).BorderAround xlContinuous, xlThin
End If
Next Row
If Cell Is Nothing Then Exit Do
If Cell.Address = Start Then Exit Do
Loop
End Sub
Bookmarks