Results 1 to 2 of 2

Thread: [RESOLVED] [Excel] VB Array Copying

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2014
    Posts
    7

    Red face [RESOLVED] [Excel] VB Array Copying

    Hey all --
    I've generated the following code. However, when I run the Sub, which generates an extensive Excel document, the formulas and numbers come out as raw text. I can't figure out what's wrong, as when I reenter the same exact text manually, it works. ExArr is an array which is placed in corresponding Excel cells, ex. 27, 13 is M27.

    Resolved! Thank you ThreadHelp!
    Last edited by strunkus; Jul 31st, 2014 at 12:46 PM.

  2. #2
    Member
    Join Date
    Apr 2014
    Posts
    35

    Re: [Excel] VB Array Copying

    Excel evaluates those assignments as string. So, for example, in M27, Excel evaluates "=(M6*10)/(4*M23)" as:
    '=(M6*10)/(4*M23)
    Try pasting that manually into an Excel Cell to see what I mean.

    To fix this, you may do the following:
    Code:
    Cells(26, 13) = Evaluate("=(M6*10)/(4*M23)")
    Last edited by ThreadHelp; Jul 30th, 2014 at 04:23 PM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width