+ Reply to Thread
Results 1 to 5 of 5

Copy and paste an active cell in an active worksheet to a merged cells in another workshee

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Copy and paste an active cell in an active worksheet to a merged cells in another workshee

    Hi guys,

    Is there a VBA code that copies a cell from a worksheet to a merged cell in another worksheet?

    I have attached a sample excel below which explains what I am trying to achieve clearly.

    Any help will be highly appreciated.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Copy and paste an active cell in an active worksheet to a merged cells in another work

    Try (put in the Sheet2 module):
    Please Login or Register  to view this content.
    See attached fyi.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Copy and paste an active cell in an active worksheet to a merged cells in another work

    Hi berlan,

    It works perfectly fine but is there anyway i can use the code in a module then apply it to a button on sheet2?

    I don't want the code to be activated unless i click the button on the worksheet.

    Many thanks in advance.

    Jin

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Copy and paste an active cell in an active worksheet to a merged cells in another work

    Hi,

    (1) link this macro to a button/shape to run it from, or (2) add a Command Button under Developer (ribbon, make sure to activate) > Insert> ActiveX Controls: Command Buttons. Then right click on the command button and "view code", and adding the code within the Sub below.

    Please Login or Register  to view this content.
    Hope that helps.
    Last edited by berlan; 07-03-2015 at 03:18 AM.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Copy and paste an active cell in an active worksheet to a merged cells in another work

    Hi berlan,

    I am trying ti avoid using command button for some reasons so your first suggestion would suit me better. However, when i link the code to the button that i have on my worksheet, it brings the following error message 'user-defined type not defined'.

    Any suggestions?

    Many thanks

+ 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] Copying worksheet while keeping row heights of merged cells and active X controls
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2014, 10:41 AM
  2. [SOLVED] Copy/paste range of cells to first empty row of active list in another worksheet
    By wildecat666 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-06-2013, 03:45 PM
  3. [SOLVED] Copy/Paste Active Cell to new worksheet problem
    By ipmaham in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-13-2012, 10:43 AM
  4. Replies: 2
    Last Post: 05-03-2006, 11:50 AM
  5. [SOLVED] Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 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