+ Reply to Thread
Results 1 to 9 of 9

combining duplicate rows with multiple columns

  1. #1
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    combining duplicate rows with multiple columns

    I am getting an excel file from a client that consists of multiple 'descriptor' columns (sample date, received date, project number, sample number, lab name, etc), and then multiple columns for each sample value (i.e. pH in column M, EC in column N, etc.). The problem is that the client will put one value per row - so in row 162 they will have all the descriptor information and a value in column M. Then in row 163 they have the same descriptor information and have a value in column N. The whole document is currently about 40 000 rows long (...), and rather than deal with the data in this way we need a way to consolidate the data so that each sample has all its values in the same row. The problem is the multiple descriptor rows - I haven't been able to find a way to consolidate the data that allows me to choose multiple columns to say the same - help?

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: combining duplicate rows with multiple columns

    Hi jharrison209,

    Without seeing the file, a Pivot table may help you.

    Can you post the file or a dummy data example to look at?

    Thanks
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    Re: combining duplicate rows with multiple columns

    Sorry for the late response. I tried using a pivot table, but the problem is some of the values are below threshold (i.e written as <0.02) and the pivot tables keep returning them as 0 (which I don't want). Is there a way to get it to return the proper value? That would fix my problem...

    If not I'll put together a dummy file to upload here.

  4. #4
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: combining duplicate rows with multiple columns

    Try highlighting the Column with the Values (Calculations) & Right click to select 'Value Field settings' >> 'Number Format' & change the Category to 'Number' & select the number of decimals you want the Pivot to present.

    Hope this helps.

  5. #5
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    Re: combining duplicate rows with multiple columns

    Sorry, I explained myself poorly. The starting data returned a result that was below threshold - i.e., the value in the cell is literally '<0.02'. The problem isn't the significant figures, it's that the pivot table is interpreting that cell as text since it contains the symbol '<', and is thus returning 0 because the max of all the other (non-text) cells is 0.

    I ended up doing a workaround by changing '<' to '9999999999' in the original file, sorting the pivot table the way I wanted it, and then changing it back after I copied&pasted the table back into a worksheet. But I really don't like that solution, is there anything else I can do?

  6. #6
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    Re: combining duplicate rows with multiple columns

    I updated my question with a dummy file here -> http://www.excelforum.com/excel-gene...ml#post3705270

  7. #7
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: combining duplicate rows with multiple columns

    Have a look at the attached file.

    I've created a summarized Pivot & also an Unsummarised Pivot.

    Let me know if this is closer to what you need.

    Re the figures written as "<0.02", can you use a negative number instead?

  8. #8
    Registered User
    Join Date
    05-20-2014
    Posts
    9

    Re: combining duplicate rows with multiple columns

    Thanks for taking a look at it! Unfortunately, it's not quite what I need. In cases where there is a duplicate data point (For example in Denny's Saltiness), I need the second data point to go on a different row. I can't take the sum OR average them in any way, nor can I simply take one and ignore the other. This is where I'm running into the most problems.

    The point about negative numbers. Yep, that's a better idea. Thank you for that.

  9. #9
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: combining duplicate rows with multiple columns

    OK, try this one.

    I think this is about as close as a Pivot will be able to do this.

    It's pretty close to what you've posted.

    Cheers

+ 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. Combining multiple rows from 2 columns into sorted columns depending on 1st columns value
    By Dexamphetamine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2013, 10:00 AM
  2. Combining Duplicate Columns with the different data in their rows
    By cleefred in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-21-2013, 10:42 AM
  3. [SOLVED] Combining Multiple Columns to Create Multiple Rows in Macro
    By TacoBrew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2013, 04:26 PM
  4. Replies: 2
    Last Post: 12-26-2012, 05:15 PM
  5. Combining multiple rows with duplicate info
    By kmlloyd in forum Excel General
    Replies: 2
    Last Post: 11-24-2009, 12:08 PM

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