Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
I have this code that encounters an error as a result of trying to divide by zero. How can I avoid this error?
Code:
Range("P2") / WorksheetFunction.Subtotal(9, Range("U18:U18" & Range("U" & Rows.Count).End(xlUp).Row))