+ Reply to Thread
Results 1 to 6 of 6

Copy and pasting Array Formula via Macro

  1. #1
    Forum Contributor
    Join Date
    01-25-2013
    Location
    nottingham
    MS-Off Ver
    Excel 2007
    Posts
    128

    Copy and pasting Array Formula via Macro

    I am trying to copy and paste an array formula via a macro. It doesn't come up with a error message, it just doesnt copy the forumla into the relevant cell even though it displays it in the macro. any help? the macro is below

    Please Login or Register  to view this content.

    the array formula is here too:

    =INDEX($L:$L,MAX((IF($L$22:$L$44=0,"",ROW($L$22:$L$44)))))
    Last edited by arlu1201; 02-05-2013 at 11:22 AM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy and pasting Array Formula via Macro

    You could try

    Please Login or Register  to view this content.
    or to copy to a range

    Please Login or Register  to view this content.
    Alf
    Last edited by Alf; 02-05-2013 at 11:22 AM.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy and pasting Array Formula via Macro

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy and pasting Array Formula via Macro

    Tsk, tsk duplicate postings as well.

    http://www.excelforum.com/excel-prog...via-macro.html

    your action Arlette

    Alf
    Last edited by Alf; 02-05-2013 at 11:38 AM.

  5. #5
    Forum Contributor
    Join Date
    01-25-2013
    Location
    nottingham
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Copy and pasting Array Formula via Macro

    I am having another problem, when i insert - Range("E23").FormulaArray = Range("M39").FormulaArray - it copies the formula and not the value. This then changes all the other values that is inserted into a table. Is there any chance of just pasting the values to the cell e23 within a macro?

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy and pasting Array Formula via Macro

    I am trying to copy and paste an array formula via a macro.
    I think you got what you asked for in your first post.

    If you only wish to copy the value you was on the right track with your macro but you don't need to use the "Select" command.

    This should be sufficient:

    Please Login or Register  to view this content.
    Alf

+ 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