+ Reply to Thread
Results 1 to 3 of 3

Updating value in table based on user input

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    Indiana
    MS-Off Ver
    Excel 2007
    Posts
    2

    Updating value in table based on user input

    Hi all,

    I have one sheet to act as a splash page for user input. The second sheet stores all relevant data. My goal is for the user to input a numerical value in a cell (or input box) and then click a submit button. The code for the macro should look at a cell on sheet 1 which displays the primary key of the row in the table on sheet 2. Based on that primary key, it should look to sheet 2 and then insert the value into the table in the correct row and column. The column headings are the days of the week, and the specific day the user is concerned with is also displayed on sheet 1.

    Sheet 1:

    A1 = Day of the week
    A2 = Unique primary key
    A3 = user input value

    Sheet 2:
    table
    Rows=primary key (001 - 999)
    Columns = days of the week (Monday - Friday)

    example:
    user inputs '5' on sheet 1 with 'Tuesday' and '007' selected in their respective cells.
    I would then like 5 to be copied to B7 (row 7 for 007 and column B for Tuesday).


    Can anyone provide some clues or guidance on the code needed to make this work?

    Thank you in advance for any help.

    -Dan

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Updating value in table based on user input

    Hello Dan,

    This macro will uses cells "A1:A3" on "Sheet1" and assumes the table is on "Sheet2". If your worksheet sheet names are different then you will need to change them in the macro.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-10-2010
    Location
    Indiana
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Updating value in table based on user input

    thats perfect! thanks for the quick response!

+ 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