Hi there
I'm trying to build a code that will look down column A, containing case references, and hide the row if part of the case has been rejected, col c. Now this is simple enough but the problem is that there can be any number of parts to a case and each part is recorded on a new row, so a case can have any number of rows.
If any one of the rows relating to the col A case reference has been rejected then all the rows with that case reference have to be hidden. This should leave me with only case references where nothing has been rejected.
So in the example below only case ref 2 would remain unhidden, as it is the only one with no rejects associated with it.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Case ref[/TD]
[TD]Customer[/TD]
[TD]Outcome[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]case ref 1[/TD]
[TD]J Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]case ref 2[/TD]
[TD]R Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]case ref 2[/TD]
[TD]R Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]case ref 3[/TD]
[TD]K Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]reject[/TD]
[/TR]
</tbody>[/TABLE]
I've not been able to come up with a way around this using functions so i think VBA is he best way.
any help would be appreciated.
John.
I'm trying to build a code that will look down column A, containing case references, and hide the row if part of the case has been rejected, col c. Now this is simple enough but the problem is that there can be any number of parts to a case and each part is recorded on a new row, so a case can have any number of rows.
If any one of the rows relating to the col A case reference has been rejected then all the rows with that case reference have to be hidden. This should leave me with only case references where nothing has been rejected.
So in the example below only case ref 2 would remain unhidden, as it is the only one with no rejects associated with it.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Case ref[/TD]
[TD]Customer[/TD]
[TD]Outcome[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]case ref 1[/TD]
[TD]J Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]case ref 2[/TD]
[TD]R Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]case ref 2[/TD]
[TD]R Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]case ref 3[/TD]
[TD]K Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]reject[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]uphold[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]case ref 4[/TD]
[TD]S Bloggs[/TD]
[TD]reject[/TD]
[/TR]
</tbody>[/TABLE]
I've not been able to come up with a way around this using functions so i think VBA is he best way.
any help would be appreciated.
John.