Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
Sub UpdateFormula
dim rng as range
dim strFormula as string
set rng = activecell
strFormula = rng.formula
strFormula = "=IF(" & strFormula & "=0,NA()," & strFormula & ")"
rngFormula = strFormula
set rng = nothing
End Sub
Sub UpdateFormula
dim rng as range
dim strFormula as string
set rng = activecell
strFormula = rng.formula
strFormula = "=IF(" & strFormula & "=0,NA()," & strFormula & ")"
rngFormula.Formula = strFormula
set rng = nothing
End Sub
Sub UpdateFormula()
Dim rng As Range
Dim strFormula As String
For Each rng In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
strFormula = rng.Formula
strFormula = "=IF(" & strFormula & "=0,NA()," & strFormula & ")"
rng.Formula = strFormula
Next rng
Set rng = Nothing
End Sub
Sub UpdateFormula()
Dim rng As Range
Dim strFormula As String
Set rng = ActiveCell
strFormula = VBA.Right(rng.Formula, VBA.Len(rng.Formula) - 1)
strFormula = "=IF(" & strFormula & "=0,NA()," & strFormula & ")"
rng.Formula = strFormula
Set rng = Nothing
End Sub
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
VB script: Files verification based on last date modified and prefix with loop number and pause param v2 | 10 | 29 | |
Delete all empty columns using VBA | 7 | 38 | |
Clear Filter | 8 | 37 | |
Formula Help | 3 | 19 |
Join the community of 500,000 technology professionals and ask your questions.