Hello,
The below code does the following:
Any cell with a 0 in the specified range gets #N/A put in the cell to the right of it.
How do I change it so:
Any cell with a 0 in the specified range gets #N/A put in the cell to the right of it UNLESS it has a value bigger than 0, in which case it gets a formula put in it?
![]()
Sub IfZero2() Dim myRange As Range For Each myRange In Sheets("Chart Data").Range("B15:B31") If myRange = 0 Then myRange.Offset(0, 1) = "#N/A" End If Next myRange End Sub
Bookmarks