+ Reply to Thread
Results 1 to 3 of 3

Return Reference of single column from defined range in VBA

  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    27

    Return Reference of single column from defined range in VBA

    Hi,

    I am trying to extract a range reference for one column (looping for all columns) that can be used in an excel formula out of a predefined range in VBA.
    So I have a predefined range of say A1:C10 called myRange and I am trying to output "A1:A10", "B1:B10" and "C1:C10" as range references. I have tried Index combined with address (and many other methods) but it doesn't seem to work.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Return Reference of single column from defined range in VBA

    Hello DH123,

    Welcome to the Forum!

    This will output the column number and the column address for the named range MyRange.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-17-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    27

    Re: Return Reference of single column from defined range in VBA

    Thanks for the help. I tried that method and it threw a global error. The workaround I found was to parse in as a string first and then use that string within the string for output as a formula as below.
    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-27-2015, 08:30 PM
  2. [SOLVED] Return multiple rows tied to reference in single row
    By ncjackso in forum Excel General
    Replies: 7
    Last Post: 05-14-2015, 11:03 AM
  3. Return any values from partial text in single reference column
    By baba_jb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-30-2013, 01:03 AM
  4. Subs and user-defined range - how to reference the U/D range?
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2011, 09:08 AM
  5. Cell reference used for Defined Range
    By Ada01 in forum Excel General
    Replies: 5
    Last Post: 10-28-2009, 10:09 AM
  6. Return Single Row of Numeric Data to Single Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-16-2005, 08:35 PM
  7. [SOLVED] Return Range of Numerical Values in Single Column based on Frequency Percentage
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2005, 06: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