+ Reply to Thread
Results 1 to 6 of 6

FormulaArray

  1. #1
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    FormulaArray

    Hi,

    See attached file .

    I have two formulas almost identical. On formula1, I have an INDEX function and on formula2, I just add an IF statement with ISERROR "=IF(ISERROR(INDEX(...);"";INDEX(...))."

    Both formulas work fine, but when I record a macro with each formula, only the 1st is working. What do I have to change on formula2 to make it work?

    Check the macros on module1

    Regards,
    Elio Fernandes
    Attached Files Attached Files
    Last edited by efernandes67; 04-29-2011 at 06:33 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: FormulaArray

    The formula is too long ( over 255 characters). However, as you are using 2007 or later, you can shorten it with IFERROR:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: FormulaArray

    Your formula is to long for .FormulaArray this is limited to 256 characters.
    Try this, Rename your Table "tbPlanSem" to a shorter name, I have used "tbPS" in this example
    Please Login or Register  to view this content.

    You will obviously have to change this name in both macros.

    Hope this helps

    [EDIT]
    Didn't see your reply romperstomper
    Last edited by Marcol; 04-28-2011 at 04:58 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: FormulaArray

    For this example its working. Thanks to you both.

    What can I do if I have formulas about 400 characters and I can not reduce them in any way?

    Regards,
    Elio Fernandes
    Last edited by efernandes67; 04-28-2011 at 06:29 AM.

  5. #5
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: FormulaArray

    You can either shorten it by using names or, if it really must exceed the character limit, you can use the Range.Replace() method outlined here:
    http://www.dailydoseofexcel.com/arch...rmulas-in-vba/
    Hope that helps,

    Colin

    RAD Excel Blog

  6. #6
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: FormulaArray

    thanks, I will try.

    Elio Fernandes

+ 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