Results 1 to 2 of 2

Thread: line up columns in Excel

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2004
    Posts
    14

    line up columns in Excel

    Im writing a program that takes 2 or more recordsets and dumps them into columns in Excel. Im dumping the recordsets one at a time. Once in Excel I need to line up the matching cells and shift non matching cells into a new row. What I need help with is the matching and shifting of the cells. For example if my spreadsheet has 4 columns that looks like this:


    VB Code:
    1. Recordset1     Recordset 2     Recordset3     Recordset4
    2.  
    3.    b              a              b               a
    4.  
    5.    c               b              c               d
    6.  
    7.    d               d              d               f
    8.  
    9.    e               e              f               g
    10.  
    11.     f
    12.  
    13. My program needs to sort the columns so that my spreadsheet looks like this:
    14.  
    15.                    a                               a
    16.  
    17.    b               b               b                      
    18.  
    19.    c                               c              
    20.  
    21.    d               d               d               d
    22.  
    23.    e               e                                            
    24.  
    25.    f                               f               f
    26.  
    27.                                                    g

    Im having trouble writing an excel macro to compare the columns to see if they should line up and how to do the shifting of the cells if they dont match. Any help would be appreciated.
    Last edited by jvdub22; Nov 23rd, 2004 at 01:43 AM.

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