Results 1 to 2 of 2

Evaluate named range to an array

Threaded View

  1. #1
    Registered User
    Join Date
    08-25-2012
    Location
    boston,ma
    MS-Off Ver
    Excel 2010
    Posts
    4

    Evaluate named range to an array

    I am trying to create an array of 1's and 0's to be used ultimately in a sumproducts function. I have created a named range referring to a column of numbers and want to create a new array of 1's and 0's in order to isolate a cell containing a particular number (.ie. make that cell a zero when all the others are 1's. I am also trying to do this using the evaluate function:

    Dim xx as variant
    Dim ra as range
    
    Set ra = wb.ActiveSheet.Range("a2").Resize(cntbank)       [set range ra to column of numbers]
     xx = Application.Evaluate("=if(" & Range(ra).Value & "=14,1,0)")     [try to create a logic vector where all of the cells are 1 except for the one equal to 14 which will be 0]
    The variable xx is coming up "empty". I am not sure if I am using the "Evaluate" function properly.

    Thanks for any help on this.
    Last edited by JBeaucaire; 08-28-2017 at 11:43 AM. Reason: Added missing CODE /CODE tags, please read and follow the Forum Rules, a link to them in blue menu bar above. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] EVALUATE Function in Named Range (ERRORS and VOLATILITY?)
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2015, 06:47 PM
  2. [SOLVED] Equating an array with named range: is this possible?
    By Erik_G in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2015, 04:28 PM
  3. [SOLVED] Evaluate Named Range Array formula to VBA Array
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-07-2014, 09:06 PM
  4. Replies: 7
    Last Post: 08-15-2013, 09:33 AM
  5. Array formulas referencing a named range or named table
    By anrichards22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-03-2013, 11:59 PM
  6. Named Range to Array
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-21-2011, 03:38 PM

Tags for this Thread

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