+ Reply to Thread
Results 1 to 5 of 5

VBA Referencing 2

  1. #1
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    VBA Referencing 2

    I was wondering if using INDIRECT() function, or something like it in VBA, I could set a range as a reference instead of a fixed value... example below:

    Instead of the range being fixed on the first line,



    Please Login or Register  to view this content.


    Please Login or Register  to view this content.
    Last edited by RBI; 10-06-2008 at 09:47 AM.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    You can reference the value in the cell as text. In the example below, cell A1 has the text B1:C8 enterred. The macro below will highlight range B1:C8

    Please Login or Register  to view this content.
    Report back

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    Please Login or Register  to view this content.
    HTH

  4. #4
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47
    Hey,

    Thanks guys it worked... i'm attaching the file because something is happening to some of the formulas once I run this macro... its very strange. i changed the settings for the skipblank_ in the pastespecial function to true so i don't loose my other formulas. Please open the sheet and run macro4 and notice the formulas in "sheet1" column "N" before and after the macro is run... this column should not be affected but for some reason the values are showing up blank even with a formula in the cell that doesn't return a blank value?

    Please help
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    Doesn't do anything to sheet1 column "N" on my computer...

    Those formulae are ghastly, so I won't begin to try to decipher. I can, however, recommend the use of Tools-> Formula Auditing -> Evaluate formula

    HTH

+ 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. Referencing a worksheet on the server using VLOOKUP?
    By OMMBoy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2010, 05:12 AM
  2. Macro for creating named ranges from relative referencing
    By parodytx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2008, 01:00 AM
  3. See all cells referencing a certain cell
    By joedrummer in forum Excel General
    Replies: 1
    Last Post: 02-26-2008, 11:52 PM
  4. Lookup referencing cell referencing range
    By cmcconnehey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-15-2008, 06:19 PM
  5. Referencing other sheets in a workbook.
    By danny2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2007, 08: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