+ Reply to Thread
Results 1 to 16 of 16

Copy from open excel sheet and paste into close excel sheet

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Copy from open excel sheet and paste into close excel sheet

    Hi:

    I have attached excel files for referance

    I need certain data from (Source File ) 10_2010_Store#1_DailySales to be copied into files
    This is Open excel file and VB script can be in this sheet:

    Destination Files - closed excel file ( i have all 31 blankfiles)
    10-1-10_Store#1_REG1
    10-2-10_Store#1_REG1
    10-3-10_Store#1_REG1
    10-4-10_Store#1_REG1 and so on until

    10-31-10_Store#1_REG1.

    Data need to be imported from 10_2010_Store1_DailySales


    P119:Q178 into 10-1-10_Store#1_REG1 at A2:B61
    T119:U178 into 10-2-10_Store#1_REG1 at A2:B61
    X119:Y178 into 10-3-10_Store#1_REG1 at A2:B61

    and so..(FYI : every 3rd Column data)

    Let us try just for 2 files for now and then we can implement for full month.

    FYI : I need to restore my daily receipt since the server they were in had crashed and i have lost daily receipts.

    Please let me know if you have any questions.

    Help is greatly appreciated..

    Thanks...
    RM
    Attached Files Attached Files
    Last edited by rizmomin; 11-13-2010 at 06:07 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet to close excel sheet

    Hi:

    Can some excel expert help with this situation.

    RM

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copy from open excel sheet and paste into close excel sheet

    You can't copy to a closed workbook.

    There's no indication how the daily sheets relate to the master
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi RoyUK:

    Can you open Files 10-X-10_Store#1_REG1, paste data, save file and close within the vb code.
    IF so please help me doing that way.

    Basically copy from Master file 10_2010_Store#1_DailySales into 10-X-10_Store#1_REG1.
    Which data to copy from Master depends on the date ...if you open master file , you will see..

    Please let me know for any more qeustions..

    Thank u so much for any help..

    RM

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy from open excel sheet and paste into close excel sheet

    Try this,
    Unzip all the workbooks and save into one separate folder, after you have adjusted the code in Module2 to the proper path,
    click the button in the store sales sheet,
    Attached Files Attached Files
    Last edited by davesexcel; 11-13-2010 at 01:17 PM.

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave:

    This is exactly what i needed...

    I may need more help with the same script...will let you know...

    I really appreciate all your and other fellows help on this forum..
    Thank U so much for all the help.

    RM

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave :

    As you know we are pasting data from A2:B61.

    On all these files i need
    A1 = "REG_CNTR"
    B1 = "REG_TOTAL"

    Please help modify the code...

    Thanks
    RM

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi RM,

    You are copying to A2, not A2: B61

    Bolded text shows the additional code

    Please Login or Register  to view this content.
    Last edited by davesexcel; 11-13-2010 at 03:03 PM.

  9. #9
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave:

    Once again thanks, this will work for me...

    Appreciate all your help.

    RM

  10. #10
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave:

    I see a small problem.
    Let me explain you.
    The file names are
    10-1-10_
    10-2-10_
    10-3-10_

    etc..
    10-11-10_
    10-12-10_
    until
    10-31-10_

    The data pasted are in the following order:

    10-1-10_
    10-11-10_
    10-2-10_
    10-21-10_

    etc...

    I hope you understand what i am saying....and help modify the code.
    Please let me know if any questions..

    RM

  11. #11
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy from open excel sheet and paste into close excel sheet

    I suppose some more manipulation is required, this is why I went with the helper sheet in the first place, I forgot to add the sort part though
    Please Login or Register  to view this content.
    Last edited by davesexcel; 11-13-2010 at 05:57 PM.

  12. #12
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave:

    It says " No Data was selected to Parse"

    When i select debug, it takes to line :

    ws1.Columns("B:B").TextToColumns Destination:=Range("B1"), Other:=True, OtherChar:="-"

    Thanks
    RM

  13. #13
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave :

    FYI:
    List sheet has following file names in order:
    10-1-10_Store#1_Z1_REG1.xls
    10-10-10_Store#1_Z1_REG1.xls
    10-11-10_Store#1_Z1_REG1.xls
    10-12-10_Store#1_Z1_REG1.xls
    10-13-10_Store#1_Z1_REG1.xls
    10-2-10_Store#1_Z1_REG1.xls
    10-3-10_Store#1_Z1_REG1.xls
    10-4-10_Store#1_Z1_REG1.xls
    10-5-10_Store#1_Z1_REG1.xls
    10-6-10_Store#1_Z1_REG1.xls
    10-7-10_Store#1_Z1_REG1.xls
    10-8-10_Store#1_Z1_REG1.xls
    10-9-10_Store#1_Z1_REG1.xls

    RM
    Last edited by rizmomin; 11-13-2010 at 05:50 PM.

  14. #14
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave:

    I am sorry but i dont see the bolded code?

    RM

  15. #15
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy from open excel sheet and paste into close excel sheet

    Check it again, in post #11

  16. #16
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Copy from open excel sheet and paste into close excel sheet

    Hi Dave :

    Now i got it....

    Thank U So much....u are so helpful..

    RM

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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