Alex Piotto
Board Regular
- Joined
- Jul 5, 2016
- Messages
- 82
- Office Version
- 2007
- Platform
- Windows
Hi!
I should be able to do it with this
But I only get -1...
May be some merged cells are to blame?
I should be able to do it with this
VBA Code:
Dim x As Long
Dim c As Range
x = Cells(Rows.Count, "B").End(xlUp).Row
For Each c In Range("H14:H" & x)
If c.Value < 0 Then
ActiveSheet.TextBox4.Value = WorksheetFunction.Sum(c)
ActiveSheet.TextBox4.Value = Format(TextBox4.Value, "#,##0.00")
End If
Next c
But I only get -1...
May be some merged cells are to blame?