Hi Guys,
I will describe you my problem as far as I can. I need help with a macro which fill search for duplicates based on column D and IF THERE IS duplicated row, he will be always in next following row. Then all what we need to do is delete the duplicated rows, but add values from columns. There is no situation where the repeated row has a value in the column where the previous row has something in it. Let me show you my problem:
[TABLE="width: 300, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]QWE[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]WER[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]ERT[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]4[/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]SDF[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]DFG[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD]FGH[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD]FGH[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]FGH[/TD]
[/TR]
</tbody>[/TABLE]
How it should look after macro?
[TABLE="width: 300, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]QWE[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]WER[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]ERT[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]SDF[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]DFG[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]FGH[/TD]
[/TR]
</tbody>[/TABLE]
As you see, ASD and FGH values got before 2 and 3 same rows with different values in columns, macro should merge 'em all and put values in one line. All duplicates won't have values in column B if first not duplicated row has something in it.
I will describe you my problem as far as I can. I need help with a macro which fill search for duplicates based on column D and IF THERE IS duplicated row, he will be always in next following row. Then all what we need to do is delete the duplicated rows, but add values from columns. There is no situation where the repeated row has a value in the column where the previous row has something in it. Let me show you my problem:
[TABLE="width: 300, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]QWE[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]WER[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]ERT[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]4[/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]SDF[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]DFG[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD]FGH[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD]FGH[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]FGH[/TD]
[/TR]
</tbody>[/TABLE]
How it should look after macro?
[TABLE="width: 300, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]QWE[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]WER[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]ERT[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]ASD[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]SDF[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]DFG[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]FGH[/TD]
[/TR]
</tbody>[/TABLE]
As you see, ASD and FGH values got before 2 and 3 same rows with different values in columns, macro should merge 'em all and put values in one line. All duplicates won't have values in column B if first not duplicated row has something in it.