+ Reply to Thread
Results 1 to 3 of 3

Formula data type?

  1. #1
    Forum Contributor
    Join Date
    06-25-2007
    Posts
    166

    Formula data type?

    I have a spreadsheet with several array formulas. They pull dates from another worksheet, so if there is no date available, the array formulas return a #DIV/0 error.

    I am trying to make it so that if there is an error, it will say "N/a" instead of #DIV/0. Instead of adding IF(ISERROR(... before each array formula, I'm trying to do this in vba to avoid making my array formulas any longer than they already are.

    The trouble I'm having is that I can't figure out how to define a variable for the formula check. This is what I have so far, but it's obviously not right since I'm getting an error:

    Please Login or Register  to view this content.
    Currently, vba highlights the line: "r = ActiveCell.FormulaArray" when I try to run the maco.

    Can anyone help me untangle this one?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about having the macro create the formula for the relevant range, replace with values, then replace the #DIV/0 in that range with N/a...

    Viable???

    rylo

  3. #3
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    Here are my impressions about the code and your problem.
    I hope it helps or suggests another direction.

    Please Login or Register  to view this content.
    Since you have only three formulas, maybe IF(ISERROR(... is best anyway
    The array formula remains stable and doesn't need to be altered
    Last edited by FrankBoston; 07-31-2007 at 11:06 PM.

+ 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