+ Reply to Thread
Results 1 to 3 of 3

Insert Array, designate EVEN or ODD

  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    USA
    MS-Off Ver
    Office 2007
    Posts
    19

    Insert Array, designate EVEN or ODD

    I have two questions. I think the first is easy, so the second is the main question.

    1. Using VBA, how to I designate that an equation is supposed to be an array?
    2. I have four values, "high A", "low A", "high A", "low B".

    The script is meant to read reference cel D5, which can either be 1 or 2.

    If it's 1, it dumps the values of high A and low A into cels O4, P4.

    If it's 2, it dumps the values of high B, low B into cels O4, P4.

    The code I have:

    Please Login or Register  to view this content.
    Which doesn't work, and returns errors. I code this code looking online for how to solve the problem.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Insert Array, designate EVEN or ODD

    Hi Jose,

    1. In VBA an array formula is entered with "FormulaArray" - see https://colinlegg.wordpress.com/2012...aarray-in-vba/

    2. If D5 is either 1 or 2 then why not use those two values in your If statement?
    If Range("D5").value = 1 then ... or
    If Range("D5").Value = 2 then ...
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Insert Array, designate EVEN or ODD

    In regards to point 2 you could use this:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

+ 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. Designate hyperlink behavior
    By koahzvika in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2013, 12:48 AM
  2. [SOLVED] Designate a Tab for array or reference for INDEX
    By BHammy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2012, 11:10 AM
  3. Replies: 3
    Last Post: 08-24-2010, 03:57 PM
  4. Replies: 2
    Last Post: 05-12-2010, 05:09 AM
  5. Replies: 1
    Last Post: 07-18-2006, 12:32 PM
  6. designate cells
    By renee in forum Excel General
    Replies: 3
    Last Post: 07-05-2006, 05:45 PM
  7. Designate Printer
    By Shelly9633 in forum Excel General
    Replies: 1
    Last Post: 02-14-2006, 11:10 AM
  8. [SOLVED] designate one cell as the variable N to be used for calc...
    By ridemore in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-15-2005, 03:45 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