+ Reply to Thread
Results 1 to 2 of 2

array formula with specific sheet reference

  1. #1
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    array formula with specific sheet reference

    Hello -

    I am trying my best to figure out what will probably be simple for most of you - hopefully.

    My goal is to include an array formula into a macro, and I keep getting an error message. I am guessing that my problem is in the sheet reference (I really am a rookie), since I know my formula works outside of the macro (see cell E2 on the "Component Analysis" sheet on the attached sample file). Below is what I wrote to make the formula work in the marcro, but alas I'm missing something.

    Note that the "general report" sheet data is irrelevant - only included to provide context to sheet names in the code below.

    Sub count_test()
    Worksheets("Component Analysis").Range("K3:K3").FormulaArray = "=SUM(IF(E4:I500<>"",1/COUNTIF(E4:I500,E4:I500)))"
    End Sub

    Thank you for any help!!
    Attached Files Attached Files

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

    Re: array formula with specific sheet reference

    You need to wrap any string-including an empty string in to ""

    Please Login or Register  to view this content.

+ 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. Replies: 4
    Last Post: 07-10-2014, 08:10 PM
  2. [SOLVED] Array formula Explained For Everyone (this is a reference sheet)
    By frankzolf in forum The Water Cooler
    Replies: 15
    Last Post: 05-20-2014, 01:02 PM
  3. Array formula Explained For Everyone (this is a reference sheet)
    By frankzolf in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-17-2014, 09:56 PM
  4. Need Help - Reference a Specific Number in a Multidimensional Array
    By kaniption in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2013, 01:04 PM
  5. Use cell value to reference sheet for array
    By Tasoli in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2013, 11:04 AM
  6. How to reference to a specific sheet?
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-24-2012, 01:58 PM
  7. UDF to reference a specific element in an array
    By GH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2005, 12:06 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