Results 1 to 13 of 13

Thread: comparison

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    comparison

    This all may be a little over my head, but I'll throw it out there and see if anyone can help.

    I have a need to do what I guess you would call a comparision on two columns in an excel spreadsheet and move the rows around to match up any duplicates. in other words, if 'Orlando' is found in cell A20 AND in B21, B35 and B40, move those rows so that all of the 'Orlando's end up in a grouping.

    Is there a way to maybe there was a way to dump the excel into a SQL Server table, massage the data to match up the rows and then dump it back out to a spreadsheet (while preserving the rest of the data in the spreadsheet)???

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    are the 2 columns related, if you move b31 does a31 have to move with it (any other cells in row 31),

    can you post an example of the data in the sheet

    maybe you could sort the data in column 1, and in column 2 then move the data in the 2 colums to align

    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    Example of data attached. Basically, the Data in Columns A and B are related and D and E are related. I need to match up the data in Columns B and D
    ie... group all the "Cullmans" together, all the "Anaheims" together, etc... but If data Column B moves to match up with a match in Column D, then the associated data in Column A must move with it. Does this sound do-able?
    Attached Files Attached Files

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    is this the result you are looking for (as far as 'F'), so i know if i am on the right track

    pete
    Attached Files Attached Files

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    I'm not sure if I know what you mean when you say (as far as 'F') ??

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    as far as the places starting with letter f in the list

    pete

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    Sorry, I completely missed the fact that you had sent back an attachment.. duh!!!!!

    yes, that is what I'm looking for. ideally all of the 'matches' found for columns B and D would be grouped together and a blank row inserted to seperate them. I wasn't sure if this could be done programmatically...

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    haha neither am i, but i wanted to make sure that at least i was trying to do what you wanted

    if a group is just 1 do you want a blank line before and after?

    pete

  9. #9

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    I would think yes. Is there really a way to do this??

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    i am sure it is possible, though i haven't got it all working properly yet

    pete

  11. #11

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    Thanx

  12. #12
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: comparison

    i managed to loose your spreadsheet, which didn't matter, but all my code went with it, so i had to start again, anyway have a look at this and give me feed back

    pete
    Attached Files Attached Files

  13. #13

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    15

    Re: comparison

    Looks like it's on the right track.. how did you do it??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width