GarrickB28
asked on
Combine multiple Rows and 2 columns into 1 row
Hello,
I think this should be an easy problem but I just cannot figure out how to do it.
In column A I have a Name, in column B a transaction code and in column C I have a date.
There are multiple encounters for each person. I was wondering how do i combine the rows to have the unique name, with the transaction code and the date of the transaction in the next column and so on. Column A is a unique number, Column B is text and Column C is a date...Here is how the table is set up....
A B C
1001 G01 1/8/2009
1001 992 1/22/2009
1001 99 2/19/2009
1001 99 3/12/2009
1002 99 1/6/2009
1002 99 1/12/2009
1002 99 3/25/2009
1002 99 4/8/2009
1004 99 1/13/2009
1004 G01 1/25/2009
I am wondering how to get
1001 99 date 1 next transaction next date
Can anyone help me out..I would love any advice. Thanks
I think this should be an easy problem but I just cannot figure out how to do it.
In column A I have a Name, in column B a transaction code and in column C I have a date.
There are multiple encounters for each person. I was wondering how do i combine the rows to have the unique name, with the transaction code and the date of the transaction in the next column and so on. Column A is a unique number, Column B is text and Column C is a date...Here is how the table is set up....
A B C
1001 G01 1/8/2009
1001 992 1/22/2009
1001 99 2/19/2009
1001 99 3/12/2009
1002 99 1/6/2009
1002 99 1/12/2009
1002 99 3/25/2009
1002 99 4/8/2009
1004 99 1/13/2009
1004 G01 1/25/2009
I am wondering how to get
1001 99 date 1 next transaction next date
Can anyone help me out..I would love any advice. Thanks
ASKER
It does not have to be, I had it in access, I tried to do a cross-tab query, but I could only get every date going cross the column headers with the transactions filled in.
Do you wish the output to be like:
A B C D
1001 G01 1/8/2009 1001 G01 1/8/2009 992 1/22/2009
1001 992 1/22/2009 1001 992 1/22/2009 99 2/19/2009
1001 99 2/19/2009 1001 99 2/19/2009 99 3/12/2009
1001 99 3/12/2009 1001 99 3/12/2009
1002 99 1/6/2009 1002 99 1/6/2009 99 1/12/2009
1002 99 1/12/2009 1002 99 1/12/2009 99 3/25/2009
1002 99 3/25/2009 1002 99 3/25/2009 99 4/8/2009
1002 99 4/8/2009 1002 99
1004 99 1/13/2009 1004 99 1/13/2009 G01 1/25/2009
1004 G01 1/25/2009 1004 G01 1/25/2009
ASKER
I only need a unique value in column A, then alternating transaction and date for as many occurences. Thanks I know this is a weird question, and I am very new to this.
A B C D E F G H
1001 G01 1/8/2009 1001 G01 1/8/2009 992 1/22/2009
1002 99 1/6/2009 1002 99 1/6/2009
1004 99 1/13/2009 1004 99 1/13/2009 G01 1/25/2009
A B C D E F G H
1001 G01 1/8/2009 1001 G01 1/8/2009 992 1/22/2009
1002 99 1/6/2009 1002 99 1/6/2009
1004 99 1/13/2009 1004 99 1/13/2009 G01 1/25/2009
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This would really need a VBA function to do smoothly. But it wouldn't be designed for input or editing data.