+ Reply to Thread
Results 1 to 6 of 6

Receive an error in long formula with macro

  1. #1
    Forum Contributor
    Join Date
    06-09-2008
    Posts
    124

    Receive an error in long formula with macro

    Hello

    How to fix this macro?

    Please Login or Register  to view this content.
    Thank You
    Last edited by yannipr; 06-14-2016 at 04:55 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Receive an error in long formula with macro

    With such a long formula and without seeing it in the context of the workbook that's very difficult to work out.
    The "0&" at the start of the formula looks suspect though.

    It would have helped if you had also showed what the formula in the worksheet itself looked like. Is that also giving you an error.

    Upload the workbook with the formula in the workbook and maybe we can help further.

    Incidentally, would you add your location to your profile. It's often useful to know when we frame answers
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Receive an error in long formula with macro

    You need to change all the empty strings in to """". Four times. If you have a none range, that is a string, you need to rub in a string as well.

  4. #4
    Forum Contributor
    Join Date
    06-09-2008
    Posts
    124

    Re: Receive an error in long formula with macro

    Please see the attached file

    I want to set this formula to cell B2 with a macro

    Thank You
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Receive an error in long formula with macro

    I should have spotted it the first time. You need to double up the quotes. i.e.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But won't
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    be simpler. There's no doubt a custom format if you don;t actually want the leading zero and - in the cell value and just want to SEE the effect.

  6. #6
    Forum Contributor
    Join Date
    06-09-2008
    Posts
    124

    Re: Receive an error in long formula with macro

    Thank You! Richard Buttrey

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. long formula to vba macro - error 1004 unable to set formulaarray property
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2013, 06:18 AM
  2. [SOLVED] Hyperlinks:receive an error message
    By Maxy007 in forum Excel General
    Replies: 3
    Last Post: 02-01-2011, 11:59 AM
  3. i receive an error running a macro
    By dversa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2009, 06:13 PM
  4. Unable to record error, long formula macro problems
    By Jerhansen277 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2008, 06:22 PM
  5. formula too long error?
    By dread in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-29-2006, 01:40 AM
  6. formula is too long error
    By w1nter11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-13-2006, 08:10 PM
  7. Error formula too long
    By JJT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-23-2005, 12:10 PM
  8. [SOLVED] formula too long error
    By SB in forum Excel General
    Replies: 2
    Last Post: 12-19-2005, 06:00 PM

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