+ Reply to Thread
Results 1 to 9 of 9

Modify this code to select different column

  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Modify this code to select different column

    Hi!
    There is a long alphabetized list of clients on the worksheet, and column E contains their last name. At the top of the sheet, there is one button for each letter. Using the code below, you click on the letter you want, and the page jumps to the first row that contains that letter. It works awesome, but I'm looking for it to select the same row, but column D, instead of column E.

    How do I modify the code below to select column D instead of E?



    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Modify this code to select different column

    Hello there,

    Try

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Re: Modify this code to select different column

    Quote Originally Posted by rvasquez View Post
    Hello there,

    Try

    Please Login or Register  to view this content.
    Hi,
    Thanks for the prompt reply!
    I tried that already, and the macro stops working. With that modification, the macro tries to reference the letter listed on the selected button to column D (where there is no text) instead of column E.

    Essentially, I need the macro to perform an INDEX/MATCH function, where column D is INDEXED, and column E is MATCHED to the text on the particular button pushed.

    I think this is the part that needs to be adjusted; I'm just not sure what I need to replace it with in order to select the same cell, just -1 column (column D instead of E):

    Please Login or Register  to view this content.
    Hopefully that clarifies it.

    Thanks!
    Last edited by Rerock; 09-17-2012 at 11:04 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Modify this code to select different column

    Can you please post a sample of your workbook?

    Thanks!

  5. #5
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Re: Modify this code to select different column

    Quote Originally Posted by rvasquez View Post
    Can you please post a sample of your workbook?

    Thanks!
    Sure. It might take a minute to extract the page to a different workbook and change all the namesand stuff, but sure; hang on.

  6. #6
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Re: Modify this code to select different column

    Okay,
    Here is a sample. Please check out the comments.
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Modify this code to select different column

    Okay, if I'm understanding correctly the following should work

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Re: Modify this code to select different column

    THAT DID IT!!

    Thank you for your help!
    Last edited by Cutter; 09-18-2012 at 11:02 AM. Reason: Removed whole post quote

  9. #9
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Modify this code to select different column

    Great, glad to help! Thanks for the star tap!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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