+ Reply to Thread
Results 1 to 9 of 9

Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Hi I am trying to make this work. But so far no luck. What i would like to do is when i double click example Cell A2 in Sheet2 it moves the cells in that row to specific cells in Sheet1- I need some which refer to the row i double click. It maybe easier to see the attached worksheet.
    I have so far put this code into Sheet 2. But it only call a macro i have recorded to move from row 2 in Sheet 2. I need some code which refer to the row i double click on, and copy the data in this row to sheet 1: so from the specific row i double click on. ¨So if i double click in example A3 it should copy these date in this row.


    In sheet1 after i would like to copy back again after i example make changes. So it overwrite in the same row i copied from Sheet2


    So blow code not working . It just copy one specific row. I need one which refer to the row i actually double click on.

    Please have a look and i have attached a test sheet more easy see there.

    Thanks in advance
    Abjac

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

  2. #2
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Ps i had some code i could not post according to some firewall it was the code recorded but can be seen in the test sheet. But weird i cant put it there. But this code again just copy from a specific row to sheet 1.- I need one which copy from the row number i click and actually in Sheet one. A code which can copy it back again same row. So it overwrite changes. Have a look thanks Abjac

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Think this is what you want:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    This version stores to row number so you can use it to update the values

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Wow was on my way to bed here. This seems to be really really good. It works perfect. The second code it store the row number in sheet 2 in cell A1. That i understand but what kind of macro example with a save button in sheet1 do i need to refer to this row number and copy the update back again? The codes are brilliant really. In the real sheet can be more to move but that i can find out. Any idea how to move them back to the row number in sheet2 from the row number in cell A1 sheet1 ?
    Ps. there can be empty cells in the real sheet.
    Sincerely abjac

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Well, if you use the second code and put the row number in cell A1, you could double click on it and use the value in copy statements ... just reverse what you did in the original move.

  7. #7
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Hi TMS. And thanks i tried i would like to have separate macro in sheet 1 to safe the changes. I tried this below referring to the value in cell A1. Bur i cant make it work. Could you have a look and see how i could make a separate macro to safe and copy the changes to sheet2 the correct row.

    This below dont work at all. Sure i do some basic mistakes . Please have a look thanks in advance Abjac

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    Hi TMS. I think i managed now to get a solution which seems to work good. It can be seen in below code. Thanks so much for your help.
    Verư very good solution and your are for sure expert. Thanks

    My working code to safe the data.

    Bad again cant get the code in because of this security . Sorry

    i Attach the workbook with the codes thanks
    Sincerely Abjac
    Attached Files Attached Files

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Double click in cell column A Sheet2 and move cells in row to specific cells in Sheet1

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] wish to double click sheet1 cell and copy cell data to sheet2 cell
    By 76_shovel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2020, 10:23 AM
  2. [SOLVED] VBA search for 2 cells from Sheet1 on Sheet2 & return another cell from same row to Sheet1
    By Gordon85 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-30-2020, 04:01 PM
  3. [SOLVED] copy cells from sheet1 to specific cells in sheet2 based on date and time of day
    By Dj Duck in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-29-2016, 06:01 PM
  4. Replies: 3
    Last Post: 09-24-2015, 08:20 AM
  5. Replies: 2
    Last Post: 07-14-2015, 04:32 PM
  6. Replies: 4
    Last Post: 07-24-2013, 04:05 PM
  7. Copy all cells in sheet1 that start with specific letters to one column in sheet2
    By jgabis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 05:01 PM

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