+ Reply to Thread
Results 1 to 8 of 8

copy cell from one cell to another

  1. #1
    Registered User
    Join Date
    08-14-2014
    Location
    Zürich, Switzerland
    MS-Off Ver
    2013
    Posts
    8

    copy cell from one cell to another

    Hi,

    I have a quite easy problem but seem not to be able to get to it:
    In a spreadsheet, I would like that the value that is (manually) entered in B3 is repeated in cells K9, 10, 11, 12, 13.
    Also, I would like that the value that is entered in G9 is repeated in H9, in G10 in H10 until G13 in H13.
    I need to do this via VBA because I am using a macro that allows to clear the content in K and H.

    Any help with this would be great.

    Thanks.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: copy cell from one cell to another

    I suggest a worksheet change event?

    In the VBA editor, double-click the sheet name that you want to do this in. Then paste this:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    08-14-2014
    Location
    Zürich, Switzerland
    MS-Off Ver
    2013
    Posts
    8

    Re: copy cell from one cell to another

    Thanks. Works perfectly. Only that G takes its value from a formula which means it will not repeat the value in H which I understand is a common problem (I have another thread on this on actually).Anyway, thanks a lot for the fast help

  4. #4
    Registered User
    Join Date
    07-24-2014
    Location
    Phoenix
    MS-Off Ver
    2007
    Posts
    21

    Re: copy cell from one cell to another

    If I understood correctly, the code below should be able to do it

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: copy cell from one cell to another

    DVP, worksheets also have calculate events, unfortunately I am not sure how to limit the scope of that process, since there is no "Target". But you could add this as another sub in your worksheet, where you put the change event (inefficient as it runs on every formula calculation on the sheet):

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-14-2014
    Location
    Zürich, Switzerland
    MS-Off Ver
    2013
    Posts
    8

    Re: copy cell from one cell to another

    Thanks. This works in principle, i.e. the value in G9 is repeated in H9, however excel immediately freezes. Here is the code I am using on the worksheet:

    Please Login or Register  to view this content.
    Last edited by DVP2010; 10-03-2014 at 05:53 AM.

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: copy cell from one cell to another

    I can't reproduce your problem on my end, of course I don't have the same workbook, but try changing the calculate macro to this and see if it helps? It should disable calculation during the update, maybe too much is happening at the same time...

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-14-2014
    Location
    Zürich, Switzerland
    MS-Off Ver
    2013
    Posts
    8

    Re: copy cell from one cell to another

    Thanks. That does not work either unfortunately. Maybe because the formula in G is a vlookup (actually index match) and not a calculation?

+ 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. Replies: 1
    Last Post: 11-06-2013, 02:56 AM
  2. copy a cell multiple times depending on cell value starting on a specific cell
    By weritadiojomiel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2013, 05:25 AM
  3. copy a specif cell value, find another like that in sheet copy adjacent cell and pate
    By smwaqas89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2013, 10:00 AM
  4. Copy values of cell into another cell using algebra to define the destiation cell
    By Glensafro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2012, 07:06 AM
  5. Automatically copy multiple cell VALUES to the cell right below the active cell
    By Sarangsood in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2011, 01:36 AM

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