+ Reply to Thread
Results 1 to 4 of 4

Copy the data in any active row in Sheet 1 to specific cells in Sheet 6

  1. #1
    Registered User
    Join Date
    01-14-2013
    Location
    Hatfield, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy the data in any active row in Sheet 1 to specific cells in Sheet 6

    As a failure analysis engineer, I keep a log of all cases I work on. Something I'd like to do with this data is automatically populate a check sheet on Sheet #6 based on the row I select in the case log on Sheet #1 when the "Populate Fields" button on Sheet #6 is clicked.

    I've uploaded the workbook itself so you can see what I'm looking for; this is not all I'd like to do with this, but I need to learn as I go, so it's a good start. Unfortunately I don't have any hardcopy reference material to work with as yet.

    Thanks to anyone who can help!


    P.S. Instead of re-uploading the finished product, as some of you sometimes are generous enough to do, I'd like to see the code and try to apply it myself. Thanks!
    Attached Files Attached Files
    Last edited by cti4sw; 02-01-2013 at 02:44 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy the data in any active row in Sheet 1 to specific cells in Sheet 6

    Here's some event code, but you may want to not use the automatic trigger??

    'automatically populate a check sheet on Sheet #6 based on the row
    'I select in the case log on Sheet #1.
    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Select The sheet from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    01-14-2013
    Location
    Hatfield, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy the data in any active row in Sheet 1 to specific cells in Sheet 6

    Yeah, you're right, I don't want an automatic trigger. As you saw in my workbook, I have a pre-made button on the Check Sheet that says "Populate Fields" that when clicked, would activate this macro based on the row selected in the FA Log. Is there any way you could show me how to tie the code to that button? Is it as simple as having the code say this:

    Please Login or Register  to view this content.
    Thanks

    EDIT: Just pasted & tested this. It didn't do anything correctly... I wanted the information in the active row from each column in the FA Log to display in its corresponding space on the Check Sheet ("RMA" from the active row in the FA Log to display in the cell adjacent to the "RMA" label in the Check Sheet, and so on), but this macro pasted the labels themselves into the Notes and Service Disposition sections of the Check Sheet.
    Last edited by cti4sw; 02-04-2013 at 09:24 AM.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy the data in any active row in Sheet 1 to specific cells in Sheet 6

    Please Login or Register  to view this content.
    Your Populate_Fields is in red above - but I changed the code a little so recopy and paste the whole thing - what kind of button are you using - your book didn't fully translate to my system??

    Did you just want to write the check sheet in the same space?? if so just change the r setting to
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    Last edited by xladept; 02-04-2013 at 03:08 PM.

+ 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