Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write this code in VBA. Does anyone know the best code to
make this work? If (IsError(mSumIfs / Kountifs),"NA", mSumIfs / Kountifs) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"DogLover" wrote:
I am trying to write this code in VBA. Does anyone know the best code to make this work? If (IsError(mSumIfs / Kountifs),"NA", mSumIfs / Kountifs) One way: Dim z as Variant On Error Resume Next z = mSumIfs / Kountifs If Err < 0 Then z = "NA" On Error GoTo 0 If you meant the Excel error #NA instead of the string "NA", then: If Err < 0 Then z = CVErr(xlErrNA) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I rewrite IF IsError Function to Work in VBA | Excel Programming | |||
Convert/rewrite SUMIFS formula to work in Excel 97 | Excel Worksheet Functions | |||
IF iserror does not work | Excel Discussion (Misc queries) | |||
ISERROR Functin to Much Work! | Excel Worksheet Functions | |||
=IF(ISERROR) doesn't work | Excel Programming |