VBA - Formatting and layout based on criterias

Status
Not open for further replies.

BorisTheCat84

New Member
Joined
Apr 30, 2021
Messages
17
Office Version
  1. 2019
Platform
  1. Windows
Original Sheet:
Mr.Excel.xlsx
ABCDEFGHIJKL
1
2UUIDWhatsover1Whatsover2Whatsover3Whatsover4Whatsover5Whatsover6Whatsover7Whatsover8Whatsover9Adjust and filterWhatsover10
3140542WhatsoverWhatsoverWhatsoverWhatsoverWhatsover5/20/2021 10:00:00 AM5/20/2021 7:00:00 PMScheduledWhatsover3-Moderate/Limited
4WhatsoverWhatsoverWhatsoverWhatsover5/21/2021 10:00:00 AM5/21/2021 10:00:00 AMOrangevrqm is great for taste
5WhatsoverWhatsoverWhatsoverWhatsoverOrangevrqm is really good
6WhatsoverWhatsoverWhatsoverWhatsoverOrange is really goodwfm0
7Orange has good result
8Orange is really good
9OrangeVMGT0 are everywhere
10BlueberryVMGT0 is really good.Blueberry is delicous
11Orange is in my house
12Blueberry is really good
13Blueberry is really good.Blueberry is delicous
14BlueberryVMGT0 is really good.Blueberry is delicous1
15Blueberry is really good.Blueberry is delicous2
16Blueberry is reallyVMGT0 good.Blueberry is delicous3
17Blueberry is really good.Blueberry is delicous4
18Blueberry is really good.Blueberry is delicous5
19140555Whatsover5/20/2021 1:00:00 PM5/20/2021 3:00:00 PMDraftWhatsoverOrange is really good3-Moderate/Limited
20Orange is reallywfm0 good
21Orangeiwfm0 has good result
22Orange are everywhere
23140888Whatsover5/20/2021 1:00:00 PM5/20/2021 3:00:00 PMDraftWhatsoverOrangeiwfm0 is really good3-Moderate/Limited
24Orange has good result
25Orangeiwfm0 is really good
26May 20, 2021 8:35 AM
Sheet1


Work to be done:
A cleanup should be done in Column K:K respecting each UUID (in such not to apply the same condition on cells that belongs to the second UUID) according to the following criteria:
1- Clear Duplicates in the column
2- Clear all cells where "vrqm" or "VMGT0" or "wfm0" is not found in any word inside the cell // (note i have more but i will add them myself)
3- Shift cell up to avoid empty cells
4- Shift cell up in case the cell that matches the UUID is empty
5- Delete Empty Rows

Once that is done we will have to work on the entire table to properly format it, we will mainly need to merge empty cells in each column till they reach the line before the next UUID starts.
Finally, last task will be to merge and center the last row.

The expected output should be as follow:
Mr.Excel.xlsx
ABCDEFGHIJKL
1
2UUIDWhatsover1Whatsover2Whatsover3Whatsover4Whatsover5Whatsover6Whatsover7Whatsover8Whatsover9Adjust and filterWhatsover10
3140542WhatsoverWhatsoverWhatsoverWhatsoverWhatsover5/20/2021 10:00:00 AM5/20/2021 10:00:00 AMScheduledWhatsoverOrangevrqm is great for taste3-Moderate/Limited
4WhatsoverWhatsoverWhatsoverWhatsover5/21/2021 10:00:00 AM5/21/2021 10:00:00 AMOrangevrqm is really good
5WhatsoverWhatsoverWhatsoverWhatsoverOrange is really goodwfm0
6WhatsoverWhatsoverWhatsoverWhatsoverOrangeVMGT0 are everywhere
7BlueberryVMGT0 is really good.Blueberry is delicous
8BlueberryVMGT0 is really good.Blueberry is delicous1
9Blueberry is reallyVMGT0 good.Blueberry is delicous3
10140555WhatsoverWhatsoverWhatsoverWhatsoverWhatsover5/20/2021 1:00:00 PM5/20/2021 3:00:00 PMDraftWhatsoverOrange is reallywfm0 good3-Moderate/Limited
11Orangeiwfm0 has good result
12
13140888WhatsoverWhatsoverWhatsoverWhatsoverWhatsover5/20/2021 1:00:00 PM5/20/2021 3:00:00 PMDraftWhatsoverOrangeiwfm0 is really good3-Moderate/Limited
14WhatsoverWhatsoverWhatsoverWhatsover5/20/2021 1:00:00 PM5/20/2021 3:00:00 PM
15
16May 20, 2021 8:35 AM
Sheet2


Your help in finding out the suitable VBA Code to that will be appreciated,
Cheers!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Duplicate to: VBA - Layout and sorting with conditions

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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