+ Reply to Thread
Results 1 to 4 of 4

Batch activating array formulas

  1. #1
    Registered User
    Join Date
    07-20-2020
    Location
    Atlanta
    MS-Off Ver
    Office 2011
    Posts
    4

    Batch activating array formulas

    Hi,

    I have 1200+ .xlsx files from which I have to extract values from column A and B into one 'master workbook'.

    All the files are named a certain number; e.g. 1.xlsx, 2.xlsx, … I need to count all values in each of the workbooks that are greater and/or smaller than a certain value in the master workbook.

    I thought about solving this using COUNTIFS (for counting with multiple criteria) and INDIRECT (to create a dynamic file path guided by the 'master list' in the master workbook).

    However, both functions require that the source workbook be opened, which is cumbersome given the large number of workbooks.

    So a solution might have been to use CONCATENATE to create a dynamic filepath for use in a SUMPRODUCT array (see enclosed sample workbook)

    (formulas are in Dutch; "TEKST.SAMENVOEGEN" = CONCATENATE, "SOMPRODUCT" = SUMPRODUCT)

    Then copy-pasting the formula as 'Values' to the next column.

    Now I need to activate all these formulas in column C: going into each cell and pressing CSE one by one works, but this takes a lot of time.

    I found the following macro to 'batch' activate the array formula in all these cells:

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


    The macro works in the sense that all formulas get the array brackets {}; however this produces a #NAME? error instead of the result of the formula.

    However, the formula works perfectly when I manually hit CSE in the cell; so there must be something about this automated way of activating the array formula that produces this error (hope I'm not overlooking something obvious here …).

    Would it be possible to make a macro that manually enters CONTROL+SHIFT+ENTER?

    I tried entering Application.SendKeys("+^ENTER") into the formula as follows (sorry, no VBA experience):

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


    This doesn't seem to work. Anyone any suggestions about how to get this macro working? Any other ideas on a solution for the broader problem are also welcome.

    Thanks a lot,
    Timothy
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    07-20-2020
    Location
    Atlanta
    MS-Off Ver
    Office 2011
    Posts
    4

    Re: Batch activating array formulas

    Sample workbook: DELETED
    Last edited by Timkeller; 07-28-2020 at 03:42 AM.

  3. #3
    Registered User
    Join Date
    07-20-2020
    Location
    Atlanta
    MS-Off Ver
    Office 2011
    Posts
    4

    Re: Batch activating array formulas

    Maybe I should specify my question:

    How should I modify the following macro as to use Sendkeys to insert CONTROL + SHIFT + ENTER in each consecutive cell?

    Is the statement "+^ENTER" correct for sending the combination of CSE?

    Please Login or Register  to view this content.
    If I use sendkeys to send the letter "A" it puts "A" several times in the same cell, instead of once in each of the consecutive cells of the selection.

    Thanks in advance.

  4. #4
    Registered User
    Join Date
    07-20-2020
    Location
    Atlanta
    MS-Off Ver
    Office 2011
    Posts
    4

    Re: Batch activating array formulas

    For those interested, I managed to force Excel to activate the SUMPRODUCT formulas, by FIND + REPLACE any character in the formula with itself.

+ 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. [SOLVED] Paste to another worksheet without activating still activating it if.....
    By karmapala in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-16-2018, 03:29 PM
  2. batch edit cell formulas
    By thdsn17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2015, 10:06 PM
  3. [SOLVED] Activating multiple formulas
    By Martinians in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-14-2015, 09:23 AM
  4. Formulas for Batch Distribution
    By bstoudt01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2014, 07:20 PM
  5. Activating Multiple Array Formulas at Once...
    By pipsturbo in forum Excel Formulas & Functions
    Replies: 32
    Last Post: 05-30-2014, 03:14 AM
  6. Activating/De-Activating Comments or only if the Cell is Active.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-31-2011, 11:08 AM
  7. Fill down formulas without activating the sheet
    By Mark Stephens in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2005, 07:05 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