Match & Sort Same Vertical Data Onto One Row

Justijb

New Member
Joined
Aug 16, 2016
Messages
43
Good Morning Fellow Excel Experts,

Per usual - a thanks to everyone who contributes to this forum! What would the macro be to sort on column A / row 1 (Last Name, First Name), data through [column B:column Q] then find that same name in multiple worksheets (tabs) and then place that same name from the different tabs onto row 1 of the original worksheet after column q / row 1. Then complete that step through the entire workbook.

Any assistance would greatly be appreciated.

-J
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Bump. I've labeled the data as current state and desired state. There are around 6k rows of data with the column a being the
unique identifier (Last Name, First Name) each record may have more than one or just one, maximum of 5-6 rows per unique name.
There is data in columns B through column P. If the name matches on column a, the next row would need to be moved up to the matching
record row and pasted starting on column q, more than two records pasted on the same row, after the two original records.

[TABLE="width: 3340"]
<colgroup><col><col><col><col span="2"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col span="2"><col><col><col span="2"><col><col span="2"><col><col span="2"><col><col><col><col><col><col span="2"><col><col><col span="2"><col><col span="2"><col><col><col></colgroup><tbody>[TR]
[TD]Current State[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]date[/TD]
[TD]action[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD]numbers[/TD]
[TD]code[/TD]
[TD]org[/TD]
[TD]position[/TD]
[TD]codenum[/TD]
[TD]type[/TD]
[TD]type1[/TD]
[TD]positin type[/TD]
[TD]from[/TD]
[TD]to[/TD]
[TD]comment[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name, First Name[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x0[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-21[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name, First Name[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x1[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-22[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x2[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-23[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x3[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-24[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x4[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-25[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name2, First Name2[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x5[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-26[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name2, First Name2[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x6[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-27[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name3, First Name3[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x7[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-28[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name4, First Name4[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x8[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-29[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name4, First Name4[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x9[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-30[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Desired State[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]date[/TD]
[TD]action[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD]numbers[/TD]
[TD]code[/TD]
[TD]org[/TD]
[TD]position[/TD]
[TD]codenum[/TD]
[TD]type[/TD]
[TD]type1[/TD]
[TD]positin type[/TD]
[TD]from[/TD]
[TD]to[/TD]
[TD]comment[/TD]
[TD]Name[/TD]
[TD]date[/TD]
[TD]action[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD]numbers[/TD]
[TD]code[/TD]
[TD]org[/TD]
[TD]position[/TD]
[TD]codenum[/TD]
[TD]type[/TD]
[TD]type1[/TD]
[TD]positin type[/TD]
[TD]from[/TD]
[TD]to[/TD]
[TD]comment[/TD]
[TD]Name[/TD]
[TD]date[/TD]
[TD]action[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD]numbers[/TD]
[TD]code[/TD]
[TD]org[/TD]
[TD]position[/TD]
[TD]codenum[/TD]
[TD]type[/TD]
[TD]type1[/TD]
[TD]positin type[/TD]
[TD]from[/TD]
[TD]to[/TD]
[TD]comment[/TD]
[/TR]
[TR]
[TD]Last Name, First Name[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x0[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-21[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD]Last Name, First Name[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x1[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-22[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x2[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-23[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x3[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-24[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD]Last Name1, First Name1[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]#[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x4[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-25[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[/TR]
[TR]
[TD]Last Name2, First Name2[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x5[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-26[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD]Last Name2, First Name2[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x6[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-27[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name3, First Name3[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x7[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-28[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last Name4, First Name4[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x8[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-29[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD]Last Name4, First Name4[/TD]
[TD]xx/xx/xxxx[/TD]
[TD]words[/TD]
[TD]data[/TD]
[TD]data[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]897689890[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]x0x9[/TD]
[TD]words[/TD]
[TD]words[/TD]
[TD]xx-01-30[/TD]
[TD]blank[/TD]
[TD]blank[/TD]
[TD]words & numbers [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Based on post# 2 , try this:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG08Aug22
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Q [COLOR="Navy"]As[/COLOR] Variant, nRng [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
[COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
    [COLOR="Navy"]If[/COLOR] Not .Exists(Dn.Value) [COLOR="Navy"]Then[/COLOR]
        .Add Dn.Value, Array(Dn, 1)
    [COLOR="Navy"]Else[/COLOR]
    Q = .Item(Dn.Value)
        Q(1) = Q(1) + 16
        Rng(1).Resize(, 16).Copy Cells(1, Q(1))
        Dn.Resize(, 16).Copy Cells(Q(0).Row, Q(1))
        [COLOR="Navy"]If[/COLOR] nRng [COLOR="Navy"]Is[/COLOR] Nothing [COLOR="Navy"]Then[/COLOR] [COLOR="Navy"]Set[/COLOR] nRng = Dn Else [COLOR="Navy"]Set[/COLOR] nRng = Union(nRng, Dn)
    .Item(Dn.Value) = Q
    [COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR]

[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]If[/COLOR] Not nRng [COLOR="Navy"]Is[/COLOR] Nothing [COLOR="Navy"]Then[/COLOR] nRng.EntireRow.Delete
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Based on post# 2 , try this:-
Code:
[COLOR=Navy]Sub[/COLOR] MG08Aug22
[COLOR=Navy]Dim[/COLOR] Rng [COLOR=Navy]As[/COLOR] Range, Dn [COLOR=Navy]As[/COLOR] Range, n [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long,[/COLOR] Q [COLOR=Navy]As[/COLOR] Variant, nRng [COLOR=Navy]As[/COLOR] Range
[COLOR=Navy]Set[/COLOR] Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
[COLOR=Navy]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
[COLOR=Navy]For[/COLOR] [COLOR=Navy]Each[/COLOR] Dn [COLOR=Navy]In[/COLOR] Rng
    [COLOR=Navy]If[/COLOR] Not .Exists(Dn.Value) [COLOR=Navy]Then[/COLOR]
        .Add Dn.Value, Array(Dn, 1)
    [COLOR=Navy]Else[/COLOR]
    Q = .Item(Dn.Value)
        Q(1) = Q(1) + 16
        Rng(1).Resize(, 16).Copy Cells(1, Q(1))
        Dn.Resize(, 16).Copy Cells(Q(0).Row, Q(1))
        [COLOR=Navy]If[/COLOR] nRng [COLOR=Navy]Is[/COLOR] Nothing [COLOR=Navy]Then[/COLOR] [COLOR=Navy]Set[/COLOR] nRng = Dn Else [COLOR=Navy]Set[/COLOR] nRng = Union(nRng, Dn)
    .Item(Dn.Value) = Q
    [COLOR=Navy]End[/COLOR] If
[COLOR=Navy]Next[/COLOR]

[COLOR=Navy]End[/COLOR] With
[COLOR=Navy]If[/COLOR] Not nRng [COLOR=Navy]Is[/COLOR] Nothing [COLOR=Navy]Then[/COLOR] nRng.EntireRow.Delete
[COLOR=Navy]End[/COLOR] [COLOR=Navy]Sub[/COLOR]
Regards Mick

Thanks Mick! Worked exactly how I needed it. Appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top