+ Reply to Thread
Results 1 to 11 of 11

Consolidate Columns & Remove Duplicates

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Consolidate Columns & Remove Duplicates

    I am trying to figure out a way of combining the contents of columns from four worksheets (project numbers, B5 to B24) into a single column on a fifth worksheet (project numbers on Totals worksheet). It also needs to remove any duplicates. I have tried using excel functions yet haven't been able to find anything that will fit my needs without becoming unwieldy. I figured a VBA macro would be able to do what I'm after but dont have any experience in VBA programming.

    I have attached the file just in case my explanation left a bit to be desired.

    Time Sheet NEW.xlsx

    Any help would be great.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Consolidate Columns & Remove Duplicates

    Hi ASD_1,

    Welcome to the forum

    Quote Originally Posted by ASD_1 View Post
    It also needs to remove any duplicates
    Please describe the above quoted sentence in brief for better understanding of your requirement. At the same time please show us the expected output also


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Consolidate Columns & Remove Duplicates

    Thanks for the reply and welcome Sixthsense.

    In the first four worksheets under the 'Project Number' columns people will enter various job numbers. On the totals worksheet in the 'Project Number' column I need a summary of every number without doubling up. So a list of 1 2 3 4 5 6 7 instead if 1 2 3 4 1 2 3 4 4 5 6 7 4 5 6 7. I have entered it into the file attached for clarity.

    Time Sheet NEW_1.xlsx

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Consolidate Columns & Remove Duplicates

    Thanks for the brief with attachment

    The project description will be same for the Project Number even though the same project Number is available in someother worksheet, Am i right?

    Or the project description will be different for each person even though the project Number is same?

    Also please describe how you are arriving the hours and total in summary sheet

  5. #5
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Consolidate Columns & Remove Duplicates

    Each project has a unique number associated to it. The four people (first four worksheets) enter the numbers of the projects they have worked on. More than one person can work on the same project. The last worksheet (Totals) is a summary of all the projects that have been worked on and then breaks down how many hours have been worked by each person on each project.

    The 'Project Description' column works already, it looks at the project number, cross references another workbook and pulls in the name recorded for that project number. All I am after is how to get the 'Project Number' column to give a summary of the projects everyone has worked on without doubling up entries.

    Thanks again for your replies.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Consolidate Columns & Remove Duplicates

    Copy the below code and Do right click on Totals sheet tab and select view code and paste it.

    Return to excel and do double click on A1 cell of Totals sheet which will update the Project No. in column B of Totals Sheet

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Consolidate Columns & Remove Duplicates

    Wow, thanks that is just what I was after.

    What would I have to do to the code to not have the cell formatting, styles and borders come through to the 'Totals' worksheet?

    Also each month the reference area is going to have to move down 30 rows. Would it be possible to connect a drop down box on the totals sheet to select the required month using your code?

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Consolidate Columns & Remove Duplicates

    Glad it helps you and for pasting the data without formatting then use the Revised Code provide below:-

    Please Login or Register  to view this content.
    Regarding your next expectation please describe it with details about cell references (The Text of the cell) and the way it needs to be arrived for my better understanding

  9. #9
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Consolidate Columns & Remove Duplicates

    Ideally on the 'totals' worksheet cell B2 will be a drop down (combo box?) where you can select the month which you want a report generated for. For example, click on cell B2 on 'totals' worksheet and select April '13, it would then retrieve project number ranges from cells B35:B54 on the other sheets instead of cells B5:B24 as it does now. That way you could create a report for any month without the need to revise the code every month. Does that make sense?

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Consolidate Columns & Remove Duplicates

    Please show it in an attachment file for better understanding

  11. #11
    Registered User
    Join Date
    03-05-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Consolidate Columns & Remove Duplicates

    I have attached a version of the workbook with comments in orange to try and explain it better. I hope it helps.

    Time Sheet NEW_2.xlsm

+ 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