+ Reply to Thread
Results 1 to 4 of 4

copy cell data to multiple sheets

  1. #1
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    24

    copy cell data to multiple sheets

    Hi I have a query re copying cell data to multiple sheets. I have setup a workbook which has an invoice sheet, Customer sheet, Bookeeping sheet etc.
    I have a vba macro that will transfer the required data to 1 sheet i.e. copy data from invoice to customers sheet. I would also like it to copy some of the data into a separate sheet at the same time
    i.e. when I click to copy details into my customer sheet it will also copy some not all data into my bookeeping sheet.

    Is this possible? If so any idea how I can achieve this?

    thanks

    William.

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

    Re: copy cell data to multiple sheets

    With VBA, most things are possible, though some are easier than others.

    But you will need to provide a lot more information. Source sheet? Target sheet(s)? From where? To where? How is the transfer to be initiated?



    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    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-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    24

    Cool Re: copy cell data to multiple sheets

    Hi thanks for that, I have uploaded my workbook fingers crossed lol.

    The sheet works as intended i.e. I fill in the required data into the invoice sheet then click on the button which sends the data to the customers sheet and clears the invoice ready for the next invoice.
    What I have been trying to do is add in more code so that it also sends selected data to a 3rd sheet "Bookkeeping" at the same time as sending it to the "customers" sheet.
    I do not need it to send the same data across just 3 cell values i.e. invoice no, invoice date and total.

    thanks,

    William
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    24

    Re: copy cell data to multiple sheets

    Hi Further to my problem I can now send the required data across to the Bookeeping sheet but I now have a problem with the value.
    When the value is added inserts the formula instead of the cell value (the amount) I now know that I should be using a PasteSpecial but I am at a loss on where I need to insert it into the code.
    This is the extra code that I have added

    Sub BookeepingTransfer()

    Dim Invoice As String, InvoiceDate As String, InvoiceAmount As String
    Worksheets("Invoice").Select

    Invoice = Range("H7")
    Amount = Range("H44")
    InvoiceDate = Range("H8")

    Worksheets("Bookeeping").Select
    Worksheets("Bookeeping").Range("A5").Select
    If Worksheets("Bookeeping").Range("A5").Offset(1, 0) <> "" Then
    Worksheets("Bookeeping").Range("A5").End(xlDown).Select

    End If

    ActiveCell.Offset(1, 0).Select
    ActiveCell.Value = Invoice
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = InvoiceDate
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = InvoiceAmount

    Worksheets("Invoice").Select
    Worksheets("Invoice").Range("C4").Select

    End Sub

    can anyone point me in the right direction?

    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] Copy Data From Multiple Sheets into Master Sheet if Cell Value >0
    By kkng in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2023, 01:07 AM
  2. [SOLVED] Copy Data from Same Cell in Multiple Sheets to One Column on Summary Sheet
    By awashington in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2023, 01:53 PM
  3. Copy cell data from multiple sheets into a specific cells on a new sheet
    By bhav123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2019, 07:23 PM
  4. Importing multiple XML files into excel and copy certain cell data to certain sheets
    By yhyhyhyh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2014, 06:51 AM
  5. Copy data from multiple sheets to one main based on cell value
    By jdjenterprises in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-28-2013, 10:13 PM
  6. Replies: 1
    Last Post: 08-21-2012, 03:14 PM
  7. same data from one cell copy to multiple sheets
    By Leza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2006, 05:55 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