+ Reply to Thread
Results 1 to 3 of 3

Find out the reference number for a column for VBA code

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Find out the reference number for a column for VBA code

    What is the easiest way to find the column reference number to use in VBA code? For instance column "C" would be 3. But when referencing column "AF" it's a pain in the ***. Any ideas?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Find out the reference number for a column for VBA code

    Hi, Jiptastic,

    you could either apply the worksheetfunction Column() in the sheet to do so or in VBA use something like
    Please Login or Register  to view this content.
    And changing the Options for Column Header Display as Numbers (R1C1) could be yet another way.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Find out the reference number for a column for VBA code

    Awesome. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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