+ Reply to Thread
Results 1 to 5 of 5

Need a Macro program to push values against fixed reference values in different columns

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    14

    Need a Macro program to push values against fixed reference values in different columns

    Hello Everyone,

    I am designing an Input Form and Database system in MS Excel, and use the 2010 version of Excel.

    What do I need?
    - I have a Database that has two columns with fixed information i.e. Registration Number and Name of Person.
    - In the Input Form, I will look-up the Registration Number (that I already know) and the Name of Person will automatically appear (Basically a vlookup)
    - Now, I want to update more information against different parameters for the respective Registration No/Name of Person
    - Once I update, the information/value against the parameters should go and sit in the same row alongside the respective Reg. No/Name under different columns.
    - Once the information/value gets recorded, I can erase the information entered in the Input Form and later follow the same procedure for other Reg. Nos/Names.

    I hope you all have understood what I need. I have attached the Excel sheet for your reference. Please help me out with this one.

    Thanks,
    Varhead
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Need a Macro program to push values against fixed reference values in different column

    Give this a go and report back your results.
    Please Login or Register  to view this content.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    06-13-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a Macro program to push values against fixed reference values in different column

    Hi Alvaro,

    That worked perfectly! Thank you so much for your assistance. I racked my brains searching for a solution on the internet and with my peers too, but nothing worked out. This is right on target! Made by day

    Thanks Again!

    Varhead

  4. #4
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Need a Macro program to push values against fixed reference values in different column

    Glad I could help.

  5. #5
    Registered User
    Join Date
    06-13-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a Macro program to push values against fixed reference values in different column

    Hi Alvaro,

    Just one doubt!

    If i enter a value against Field 1 i.e. G15 and Field 3 i.e. G17 and run the Macro, the contents will get recorded under the respective column. If i enter a value against Field 2 i.e. G16, and run the macro, it erases the previously recorded values of G15 and G17 and only displays G16.

    I might be related to rngField.ClearContents, but need to know how do i modify it to suit the current need

    Thanks,
    Varhead

+ 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