+ Reply to Thread
Results 1 to 11 of 11

Macro to copy,paste and group information based on value in a cell

  1. #1
    Registered User
    Join Date
    08-04-2012
    Location
    NJ
    MS-Off Ver
    Excel 2010, Excel 2007
    Posts
    16

    Macro to copy,paste and group information based on value in a cell

    HI

    I am in need of some help.
    I have attached the following excel page. My question is the following. Since i have to enter numerous Schedule B Numbers (Cell B:6) a day and most of them repeats itself more than once. How can i create a macro that copy the contents enter on row 6 and groups them together further down in the page or in a different page by schedule B numbers and auto sum the values in rows C,D and E (for every schedule B number). so the result would look something like in spread sheet (manually inserted) including the smaller font size. the contents in row 6 will have to be deleted after this to allow new information to be entered.
    i know that i could type this straight to the excel sheet, but the problem is that the SCH. B are not in order in the PDF files that i receive daily, they are mixed all over the 20+ pgs. I tried to convert the PDF files to excel file but this are commercial invoices and the delimiters wont work since there are lots of information besides the numbers.
    Any help on how to do this will help me greatly since for now i am doing it manually.
    Thanks in advance for your help!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Macro to copy,paste and group information based on value in a cell

    You have shown the output you need which is good. You need to show how the raw data looks like also.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-04-2012
    Location
    NJ
    MS-Off Ver
    Excel 2010, Excel 2007
    Posts
    16

    Re: Macro to copy,paste and group information based on value in a cell

    HI

    Thank you for your reply. Basically i will be entering the data on the top rows (5 & 6 ) by hand so it will be pretty straight forward data entry.

  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Macro to copy,paste and group information based on value in a cell

    But from where will the other data come?

  5. #5
    Registered User
    Join Date
    08-04-2012
    Location
    NJ
    MS-Off Ver
    Excel 2010, Excel 2007
    Posts
    16

    Re: Macro to copy,paste and group information based on value in a cell

    i am not sure what you mean.
    As i explained i will enter the data manually from invoices that i receive in a pdf file to my email.
    i will input the data in row 6 and either presser enter or press the macro button once rows B,C,D & E are completed and the macro will execute.
    then the data will be populated as in row 9 thru 29 wither in the same page or in another page.
    since i will be entering different part numbers the rows will have to be inserted under their respective part numbers as in the attached file.

    I hope i am clear enough and thank you a lot for your reply

  6. #6
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro to copy,paste and group information based on value in a cell

    Hi gullit

    Does it matter what order the new items are added? You appear to have the newest item first...can the newest item be last?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Registered User
    Join Date
    08-04-2012
    Location
    NJ
    MS-Off Ver
    Excel 2010, Excel 2007
    Posts
    16

    Re: Macro to copy,paste and group information based on value in a cell

    The order does not matter at all as long as they are grouped together with their same product numbers

  8. #8
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro to copy,paste and group information based on value in a cell

    Hi gullit

    Assign this code to the button
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jaslake; 08-14-2012 at 10:25 AM. Reason: added line of code

  9. #9
    Registered User
    Join Date
    08-04-2012
    Location
    NJ
    MS-Off Ver
    Excel 2010, Excel 2007
    Posts
    16

    Re: Macro to copy,paste and group information based on value in a cell

    Thanks a lot J. It works like magic, jsut what i need it!!!

  10. #10
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro to copy,paste and group information based on value in a cell

    Hi gullit

    You're welcome...glad to be of help. If this satisfies your requirements please mark your Thread as SOLVED.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro to copy,paste and group information based on value in a cell

    @ gullit

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, 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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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