+ Reply to Thread
Results 1 to 11 of 11

Excel VBA copy values from one sheet to Another

  1. #1
    Registered User
    Join Date
    07-21-2023
    Location
    uae
    MS-Off Ver
    2016
    Posts
    8

    Excel VBA copy values from one sheet to Another

    Dear all,

    I have attached an excel file here, it is self explanatory, first sheet is for invoice entry, when I click generate button data should copy to print sheet. data should paste transpose mode, insert rows, should skip blank rows. please look into this and help me if you can.

    rgdsinvtst.xlsm

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Excel VBA copy values from one sheet to Another

    In sheet "Invoice Entry" is there several times Service1,2,3 ?
    If yes is there several Print sheet to prepare ?
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    07-21-2023
    Location
    uae
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel VBA copy values from one sheet to Another

    Thanks for the reply.
    No, all services should be on the print sheet, down by down.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Excel VBA copy values from one sheet to Another

    norules1,
    In sheet "Invoice Entry" is possible to have several times Service1 ?
    Sheets "Print report should be" and "Print" are differents, do we need to prepare the 2 sheets ?
    PCI

  5. #5
    Registered User
    Join Date
    07-21-2023
    Location
    uae
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel VBA copy values from one sheet to Another

    PCI,
    Sorry for my poor explanation.
    In sheet "Invoice entry" the service1 is just a description. it may repeat also.
    We need to prepare only one "Print" sheet. "Print should be" which I added is for how the output should be.

    If you run my code, everything is perfect except skipping the blank cells. It counts the right-side columns of each "particular" but displays blank cells and corresponding headers too. I want to paste only the cell values that are not equal to zero and the corresponding headers.
    Thanks

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Excel VBA copy values from one sheet to Another

    If you run my code, everything is perfect except skipping the blank cells
    Therefore next code could good enought to clean up "Print" sheet.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-21-2023
    Location
    uae
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel VBA copy values from one sheet to Another

    PCI,
    Sorry, this is not the code I am really looking for.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Excel VBA copy values from one sheet to Another

    See if this is how you wanted.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-21-2023
    Location
    uae
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel VBA copy values from one sheet to Another

    Jindon,

    Excellent! Thank you!!

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Excel VBA copy values from one sheet to Another

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Excel VBA copy values from one sheet to Another

    Thx norules1 for the Rep.
    What a pleasant new year ... happy new year to you to.

+ 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 values from one excel sheet to another by matching multiple columns
    By abay5000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2022, 03:52 PM
  2. Copy Named Range values from one sheet to another in excel using VBA
    By BMD4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2020, 12:42 AM
  3. VBA Code - Copy Table in Excel from Sheet to Sheet - Values Only (No formulas)
    By Laurunner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-10-2019, 08:51 AM
  4. [SOLVED] Lookup values from sheet 2 with sheet 1 and copy found values in cell b of sheet 1
    By spa3212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2016, 03:28 AM
  5. To Copy Values from Excel sheet to a VBA form
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2012, 08:05 AM
  6. Copy paste a range of values into a different excel sheet
    By Hugopellegrini in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2012, 05:15 AM
  7. How to copy values from an excel sheet and copying it to another sheet when changed?
    By 77anders in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-02-2009, 11:40 AM

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