+ Reply to Thread
Results 1 to 9 of 9

Copy two data sets, filter it and paste to summary sheet

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Copy two data sets, filter it and paste to summary sheet

    Hi Guys
    I have the following Macro and wondered if anyone could help me adapt it?

    Please Login or Register  to view this content.
    This is what I need:
    I need it to copy the customer reference and customer name on the “budget” tab which will always be in C6:D105.

    Then I also need it to copy the customer reference and customer name from the “Act Unit” sheet. However the difference with this is that this data isn’t in a set range – I would need the macro to look up the last occurrence within a column if possible? Or even if it copied the entire rows (3&4 starting in column H then that would be ok).

    Then I would need it to paste the data to the “Macro” sheet (the 2nd lot of data will need to be transposed).

    Once pasted I need and auto filter applied for unique values and finally copied and pasted to the “Summary” sheet.


    Can anyone advise where to start?

    I have attached an example file
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    I get an error here:
    Columns("D6:D105")

    Previously when the macro worked for something else this was columns "D:D" how do I restrict it to cells D6:D105?

  3. #3
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    Regarding the copy column would this code be what i am after???: I am clutching at straws as I dont know VBA at all

    HTML Code: 

  4. #4
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    Hi,
    I managed to get the first part of the copy and past working but REALLY stuggling with the 2nd part.

    Here is the code that copies the data on the budget sheet:
    Please Login or Register  to view this content.
    I now need to copy the data on “Act Units” sheet Row 4 starting in column H to the last non blank column. Can anyone help with this part please?

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    Would this select the data I need?:
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    Anyone? I'm completely stuck on how to do this

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy two data sets, filter it and paste to summary sheet

    Quote Originally Posted by pauldaddyadams View Post
    I get an error here:
    Columns("D6:D105")

    Previously when the macro worked for something else this was columns "D:D" how do I restrict it to cells D6:D105?
    If you need it to refer to D6:D105, you need to use Range("D6:D105")
    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]

  8. #8
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Copy two data sets, filter it and paste to summary sheet

    Hi Arlette, thanks for looking.

    I managed to get that bit to work. What I am stuck on now is selecting the range for the data on the "act Units" sheet. This can be found starting in cell H4 but then the code would need to find the last column used. Can you help with this part?

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy two data sets, filter it and paste to summary sheet

    You can use this to get the last column -
    Please Login or Register  to view this content.

+ 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