+ Reply to Thread
Results 1 to 6 of 6

copy value from one sheet to another

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Yorkshire UK
    MS-Off Ver
    office pro 2013
    Posts
    7

    copy value from one sheet to another

    Hi there
    firstly apologies if this is the most basic question ever!

    I have a workbook with several pages
    page 1 - summary page
    page 2 - calcs etc

    I have a macro on page 2 that when run copies say 10 rows from elsewhere in the page to the 'calculation' area
    my problem is how to reference this on page 1

    if i reference the cell with the macro already having been run then i get a #ref error when i open the book
    if i reference the cell without the macr run then when i do run the macro the referenced cell (lets say f10) changes to f20
    I have tried $f$10 but this makes no odds

    There are a choice of macros to achieve the same resuilt - (depending on size of additional product)
    or none if no additions are required

    hope i have been sufficiently detailed in my question
    many thanks in advance

  2. #2
    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,371

    Re: copy value from one sheet to another

    OK, so you're asking us for advice on how to improve your macro without sharing your code, or uploading a sample workbook to use for testing solutions.

    Don't hold your breath

    Regards, TMS
    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


  3. #3
    Registered User
    Join Date
    08-18-2015
    Location
    Yorkshire UK
    MS-Off Ver
    office pro 2013
    Posts
    7

    Re: copy value from one sheet to another

    Hi there
    apologies for the breach of protocol
    i attach a form of the sheet i am working on
    the only insertable is the top one (in yellow) rows 73-87
    The macro - once clicked - appears from row 25
    I want to eventually be able to put several values from this into row 39 (after macro run)

    I was not expecting to have additions to macros ... more expecting to be informed of a 'basic' that i didnt know about
    anyhoo...
    thanks in advance to whomever is helpful
    xxx

  4. #4
    Registered User
    Join Date
    08-18-2015
    Location
    Yorkshire UK
    MS-Off Ver
    office pro 2013
    Posts
    7

    Re: copy value from one sheet to another

    ok... so I have a fix (although not ideal)
    i have made another macro ... with another button... on click of button this macro is executed:
    Sub Rectangle3_Click()
    Worksheets("R-A").Range("J35").Copy _
    Destination:=Worksheets("R-A").Range("J39")
    Worksheets("R-A").Range("h35").Copy _
    Destination:=Worksheets("R-A").Range("i39")
    End Sub
    this works but I will have to copy and modify the same macro multiple times as I have multiple pages
    I guess as i go I will become more proficient and learn sneaky shortcuts
    for example can you , rather than specifying the sheet (R-A), just say "this sheet?"
    learn learn learn...

  5. #5
    Registered User
    Join Date
    08-18-2015
    Location
    Yorkshire UK
    MS-Off Ver
    office pro 2013
    Posts
    7

    Re: copy value from one sheet to another

    Sub Rectangle3_Click()
    Range("J35").Copy _
    Destination:=Range("J39")
    Range("h35").Copy _
    Range("i39")
    End Sub

    obvs...lol

  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,371

    Re: copy value from one sheet to another

    Glad you have managed to sort it out for yourself.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Copy specific data from a sheet to temp sheet and copy temp sheet to new workbook
    By ANUARORA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2015, 11:58 AM
  2. how to copy specific data from a sheet to temp sheet and copy temp sheet toa new workbook?
    By NatashaKapoor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2014, 09:01 AM
  3. Lookup Value from Sheet 4 in Sheet 2, if found copy Sheet 2 Active Row to Sheet 5
    By lgosso23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2013, 02:51 PM
  4. Replies: 1
    Last Post: 06-05-2013, 07:03 AM
  5. Replies: 1
    Last Post: 01-07-2013, 12:23 AM
  6. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  7. Replies: 11
    Last Post: 10-14-2012, 01:03 PM

Tags for this Thread

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