VBA Group Row Based on Cell Critieria

unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
249
Office Version
  1. 2016
Platform
  1. Windows
Hello Guys,

I have below data that I need to group based on criteria below:

Raw (Sheet1):

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]01[/TD]
[TD]Donna[/TD]
[TD]Done[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]Karl[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]06[/TD]
[TD]Ems[/TD]
[TD]Pending[/TD]
[/TR]
[TR]
[TD]02[/TD]
[TD]Shawn[/TD]
[TD]Incomplete[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]Mae[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]03[/TD]
[TD]Ann[/TD]
[TD]OK[/TD]
[/TR]
</tbody>[/TABLE]


End Result:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]01[/TD]
[TD]Donna[/TD]
[TD]Done[/TD]
[/TR]
[TR]
[TD]03[/TD]
[TD]Ann[/TD]
[TD]OK[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]Karl [/TD]
[TD]Compelete[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]02[/TD]
[TD]Shawn[/TD]
[TD]Incomplete[/TD]
[/TR]
[TR]
[TD]05[/TD]
[TD]Mae[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]06[/TD]
[TD]Ems[/TD]
[TD]Pending [/TD]
[/TR]
</tbody>[/TABLE]


Basically, I need to group the whole data and separate those with Status note:
Upper Part: "Done", "OK", "Complete"
Bottom Part: "Pending", "Incomplete" and Blank cell

I need to do the same process on 5 more sheets (Sheet2-Sheet6). Note that the range may vary so need to highlight the whole row in separating data and sorted in descending order. :)

Any help will be much appreciated.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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