+ Reply to Thread
Results 1 to 4 of 4

How to enter array formula with curly brackets into cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    How to enter array formula with curly brackets into cell

    Hello all

    Is there a trick to put an array formula with curly brackets {} into a cell through VBA. If entered manually I would CTRL+SHIFT+ENTER, but not sure how to do it from VBA?

    Example, I need to enter a formula I define in sResult into a cell, but it has to be entered as an array with {}

    sResult = "INDEX(C$3:C$13,SMALL(IF((B$3:B$13=C$16)*(D$3:D$13=C$18),ROW(C$3:C$13)-ROW($C$2)),ROW($A1)))"
    Cells(1, 1).Value = sResult

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to enter array formula with curly brackets into cell

    Hi,

    You use the formulaarray property
    Cells(1, 1).formulaarray = sResult
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Re: How to enter array formula with curly brackets into cell

    Exactly what I was looking for - thanks a lot!

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to enter array formula with curly brackets into cell

    You're welcome.

+ 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. Sum and Countif Formulae with curly brackets to find a percentage
    By deborahlane in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-13-2015, 04:41 PM
  2. [SOLVED] SUM(COUNTIF.. with more than one pair of curly brackets ?
    By Gabor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2013, 03:46 PM
  3. what is the meaning of curly brackets in the functions { }
    By funtastic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2013, 04:23 PM
  4. What do curly brackets /braces {} do in VBA
    By Huugin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-17-2012, 04:33 PM
  5. [SOLVED] Excluding Single Member from CUBEVALUE using Curly Brackets
    By tlafferty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2012, 05:58 PM
  6. [SOLVED] Curly Brackets in formula view
    By VBSK8R in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2012, 09:32 AM
  7. Replies: 5
    Last Post: 04-19-2012, 09:02 AM

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