+ Reply to Thread
Results 1 to 6 of 6

Loop to add string to bottom of a variable column

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Loop to add string to bottom of a variable column

    Hey guys,

    So I have a drop down menu on a worksheet, with values that match up to columns on the same sheet. What I'm trying to do is when a user chooses a value from the dropdown menu and clicks the "run" button, a string (in this case "x") will be placed in the first blank row of the column that corresponds with the value of the dropdown menu.

    I've had limited success so far, as I can get the "x" to appear in different places based on the selection in the dropdown menu, just no where close to where I want it to be.

    The workbook is attached if anyone could provide some insight or suggestions or point out my mistakes.

    Thanks

    Here is some of the code as well

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop to add string to bottom of a variable column

    The .FIND method will get you there the fastest:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Loop to add string to bottom of a variable column

    Actually I have one more question:

    So that worked perfectly when all the data was on one worksheet, but how could I check the J2 value on the active worksheet and place the "x" in a worksheet called Lists ?
    Last edited by construct; 06-07-2012 at 01:27 PM.

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Loop to add string to bottom of a variable column

    sActually I have one more question:

    So that worked perfectly when all the data was on one worksheet, but how could I check the J2 value on the active worksheet and place the "x" in a worksheet called Lists ?

  5. #5
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Loop to add string to bottom of a variable column

    Nevermind, I played with the code and did it myself. Just created a second with statement for placing the outcome. Thanks!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop to add string to bottom of a variable column

    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)

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