VBA Macro that will clean and tranform messy time/hour workbook.

PWil84

New Member
Joined
May 20, 2021
Messages
41
Office Version
  1. 2019
Hello All,

I receive a work book weekly that's messy with time custom formatted, inconsistent formatting of time, and text in rows where time should be that I have to filter and delete. Is there a way I can write a macro in VBA that would filter and delete rows with text then format rows into proper time format? I've gotten started with a filter function in VBA can anyone provide guidenace about how I can do the rest?

Sub Delete_rows_based_values()
ActiveSheet.Range("A1:P1").AutoFilter Field:=8, _
Operator:=xlFilterValues, Criteria1:=Array("NO SHOW", "No Show", "no show")


End Sub


1670012015399.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Power Query is literally built to clean up messy data sources, you should give it a go.
 
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,779
Members
449,123
Latest member
StorageQueen24

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