Hey folks, am hoping the collective wisdom on here can point me in the right direction...
I have a large chunk of data, up to 1000 rows by 20 columns, which sometimes contains duplicates (generally each instance of a duplicate having only 2 rows, but potentially more). In the case of a duplicate, only ONE column really needs to be considered - a unique reference number.
I'd like to have a macro review all of the rows and where the data is identical in a given column, hide that row or rows.
So in the example below, I'd want row 3 to be hidden, but rows 1 and 2 to remain shown as they are for different unique reference numbers, despite being for the same name.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]column A[/TD]
[TD] column B[/TD]
[TD]column C, etc[/TD]
[/TR]
[TR]
[TD]row 1[/TD]
[TD]12345[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]row 2[/TD]
[TD]34567[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]row 3[/TD]
[TD]12345[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
</tbody>[/TABLE]
Also, out of curiosity, how would I do the same thing, but hide the row if ALL the data in the row was identical to another row?
I am thinking arrays but I've never used them... does anyone have any simple examples I can use and build on from there?
Thanks in advance!
I have a large chunk of data, up to 1000 rows by 20 columns, which sometimes contains duplicates (generally each instance of a duplicate having only 2 rows, but potentially more). In the case of a duplicate, only ONE column really needs to be considered - a unique reference number.
I'd like to have a macro review all of the rows and where the data is identical in a given column, hide that row or rows.
So in the example below, I'd want row 3 to be hidden, but rows 1 and 2 to remain shown as they are for different unique reference numbers, despite being for the same name.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]column A[/TD]
[TD] column B[/TD]
[TD]column C, etc[/TD]
[/TR]
[TR]
[TD]row 1[/TD]
[TD]12345[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]row 2[/TD]
[TD]34567[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
[TR]
[TD]row 3[/TD]
[TD]12345[/TD]
[TD]Mr Smith[/TD]
[TD]Address[/TD]
[/TR]
</tbody>[/TABLE]
Also, out of curiosity, how would I do the same thing, but hide the row if ALL the data in the row was identical to another row?
I am thinking arrays but I've never used them... does anyone have any simple examples I can use and build on from there?
Thanks in advance!