+ Reply to Thread
Results 1 to 5 of 5

Code needed to move cell value from one sheet to another if match is found.

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    62

    Code needed to move cell value from one sheet to another if match is found.

    I am a self taught Excel novice..only know enough to be dangerous..and I am stumped.
    I know nothing about VBA but I think that I need a sub to complete a task that I am attempting.
    I have a report template that i can't add code to but I want to import values from another sheet into the report.
    Attachment 182652
    Sheet1 is the report that needs the Measured Dimension fields completed and Sheet2 are the measured dimensions.
    When I type in the correct position of column A Sheet1 into column A Sheet2 the correct dimensions should transfer
    from column J on Sheet2 to column I on Sheet1.
    Apologies in advance if I have broken any forum rules and if this has been answered b4 please point me in the right direction.
    Last edited by SLIDE1; 09-25-2012 at 07:54 PM.

  2. #2
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Code needed to move cell value from one sheet to another if match is found.

    Slide1,

    Is Sheet1 your report template? Do you want the code to look at the value typed into Column A in Sheet2 and transfer the value from Column J into the corresponding item in Sheet1? Would you be happy with a button to transfer all the values across into Sheet1 or would you prefer it to automatically update?

    Mowgli

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: Code needed to move cell value from one sheet to another if match is found.

    Yes Sheet1 is the template and automatic would be preferred as I am unfamiliar with
    VBA, but If a button is what i need I can get it done.

    Thanks for your help.

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Code needed to move cell value from one sheet to another if match is found.

    Slide1,

    Am not great at the whole VBA thing so am absolutely certain there is a better and tidier method than what I have shown however it does appear to work. I have included an "Import" button which runs the macro called "Check" as when I tried to get it to run on the workbook change event it caught itself in some sort of loop and hung my computer.

    At the start of the code for Check there is a section which clears the previous selection from Sheet1, if this is not what you want then you should be able to delete it easily enough. I have also tried to include annotation beside the code to say what each bit does as this may help your understanding. Let me know if its what you are after or not

    Example Copying.xlsm
    Last edited by Mowgli; 09-25-2012 at 10:30 AM. Reason: Attachment not correct

  5. #5
    Registered User
    Join Date
    09-25-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    62

    Re: Code needed to move cell value from one sheet to another if match is found.

    Mowgli,

    Thanks for the code! It looks like it should work just as I need it to. I will have my operators try it out on some new data tomorrow.
    This will save us a great deal of time typing in dimensions.
    Thanks again!

+ 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