S.H.A.D.O.
Well-known Member
- Joined
- Sep 6, 2005
- Messages
- 1,915
Good evening,
The below code inserts nothing instead of a ZERO if there are NO results produces. It works fine if there are results produced . . .
Thanks in advance, Paul.
The below code inserts nothing instead of a ZERO if there are NO results produces. It works fine if there are results produced . . .
VBA Code:
Set Cel = Range("M8")
If DD = 0 Then Exit Sub
Cel.Resize(DD) = Results
Cel.Resize(DD).Offset(, 1) = 0
Cel.Offset(-2, 1) = _
Application.CountIf(Range("N8:N" & Cells(Rows.Count, "N").End(xlUp).Row), "<>")
Cel.Offset(-2, 1).Value = Format(Cel.Offset(-2, 1).Value, "#,##0")
Thanks in advance, Paul.