+ Reply to Thread
Results 1 to 5 of 5

Alternative to IFERROR function in VBA

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Alternative to IFERROR function in VBA

    I'm working off a macro that was passed down to me. I have inserted a simple formual, =J4/H4, but would like to run an IFERROR to return a blank cell. It won't let me do this. Any alternatives?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Alternative to IFERROR function in VBA

    How about:

    =IF(H4="", "", J4/H4)

    or

    =IF(H4=0, "", J4/H4)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-08-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Alternative to IFERROR function in VBA

    The first formula returned FALSE and the second one made me debug. I'm looking for the cell to be blank until the the other cells are filled in with information.

  4. #4
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Alternative to IFERROR function in VBA

    How about this one

    Please Login or Register  to view this content.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Alternative to IFERROR function in VBA

    Which other cells, exactly, in a formula you can do all that if you specify?

    Examples:

    =IF(COUNTA(A4:D4)<4, "", <MyFormula>)

    =IF(ISERROR(<MyFormula>), "", <MyFormula>)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1