+ Reply to Thread
Results 1 to 4 of 4

Using variable column reference in VBA worksheet function

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Michigan, US
    MS-Off Ver
    2010
    Posts
    8

    Using variable column reference in VBA worksheet function

    I've been stuck on this for a while now, I hope someone can help. I have the following line in VBA which works.



    Please Login or Register  to view this content.
    I have a variable for the column adress of the second part of the formula so it looks like this

    Please Login or Register  to view this content.
    But it says I don't have the correct syntax. What do I need to do to fix it?

    Any help is greatly appreciated!

    Thanks!
    Maria

  2. #2
    Registered User
    Join Date
    06-25-2014
    Location
    Michigan, US
    MS-Off Ver
    2010
    Posts
    8

    Re: Using variable column reference in VBA worksheet function

    The variable is also a string, I just don't understand why it doesn't work

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using variable column reference in VBA worksheet function

    There shouldn't be a " between )) and *.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    06-25-2014
    Location
    Michigan, US
    MS-Off Ver
    2010
    Posts
    8

    Re: Using variable column reference in VBA worksheet function

    Norie,

    Thank you, it works now!

+ 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. Use variable column reference in VBA worksheet function
    By MariaM02 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2014, 12:38 PM
  2. Use variable column reference in VBA worksheet function
    By MariaM02 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2014, 08:29 AM
  3. OFFSET function - column reference over the edge of the worksheet
    By ronaldev in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2013, 10:09 PM
  4. Replies: 2
    Last Post: 10-06-2009, 04:32 AM
  5. how to reference a worksheet with a variable vs a name
    By ibbm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2006, 03:00 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