#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dan dan is offline
external usenet poster
 
Posts: 866
Default Consolodate?

I have a list of data with two coloums, the first coloum contains duplicate
date and the second unique. i want to create a type of table making the first
coloum with unique data.

like this

raw data
Job No Element Code
Job001 C034
Job002 D010
Job002 D011
Job002 D010
Job003 C039
Job004 B009
Job005 P045
Job006 C047
Job006 C046
Job007 P033
Job008 C034
Job008 C008
Job009 C015
Job009 D016
Job009 C071
Job010 JW0027
Job011 BP1320
Job011 BP1320
Job011 BP1320
Job012 CB2260
Job013 EH0720
Job014 BP1350
Job014 DI0470
Job015 CF1430
Job016 BF1220
Job017 EI0110
Job018 PZ0810
Job019 PM1140
Job020 CD0450


to this

Job No Element Code
Job001 C034
Job002 D010 D011 D010
Job003 C039
Job004 B009
Job005 P045
Job006 C047 C046
Job007 P033
Job008 C034 C008
Job009 C015 D016 C071
Job009
Job010 JW0027
Job011 BP1320 BP1320 BP1320
Job012 CB2260
Job013 EH0720
Job014 BP1350 DI0470
Job015 CF1430
Job016 BF1220
Job017 EI0110
Job018 PZ0810
Job019 PM1140
Job020 CD0450

is there a formula - i have tried pivot table but that doesnt work?
--
Cheers
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Consolodate?

Try this macro:

Sub dan()
n = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To n
If IsEmpty(Cells(i, 1)) Then Exit Sub
With Cells(i, 1)
If .Value = .Offset(-1, 0).Value Then
j = Cells(i - 1, Columns.Count).End(xlToLeft).Column + 1
Cells(i - 1, j).Value = .Offset(0, 1).Value
Range("A" & i & ":B" & i).Delete
i = i - 1
End If
End With
Next
End Sub

--
Gary''s Student - gsnu200771


"Dan" wrote:

I have a list of data with two coloums, the first coloum contains duplicate
date and the second unique. i want to create a type of table making the first
coloum with unique data.

like this

raw data
Job No Element Code
Job001 C034
Job002 D010
Job002 D011
Job002 D010
Job003 C039
Job004 B009
Job005 P045
Job006 C047
Job006 C046
Job007 P033
Job008 C034
Job008 C008
Job009 C015
Job009 D016
Job009 C071
Job010 JW0027
Job011 BP1320
Job011 BP1320
Job011 BP1320
Job012 CB2260
Job013 EH0720
Job014 BP1350
Job014 DI0470
Job015 CF1430
Job016 BF1220
Job017 EI0110
Job018 PZ0810
Job019 PM1140
Job020 CD0450


to this

Job No Element Code
Job001 C034
Job002 D010 D011 D010
Job003 C039
Job004 B009
Job005 P045
Job006 C047 C046
Job007 P033
Job008 C034 C008
Job009 C015 D016 C071
Job009
Job010 JW0027
Job011 BP1320 BP1320 BP1320
Job012 CB2260
Job013 EH0720
Job014 BP1350 DI0470
Job015 CF1430
Job016 BF1220
Job017 EI0110
Job018 PZ0810
Job019 PM1140
Job020 CD0450

is there a formula - i have tried pivot table but that doesnt work?
--
Cheers

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consolodate Data from Multiple Rows into One Row Doug Randall Excel Discussion (Misc queries) 2 October 24th 06 04:49 PM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"