Clear certain cells

JOEE1979

Active Member
Joined
Dec 18, 2022
Messages
267
Office Version
  1. 365
Platform
  1. Windows
Hello everyone
UNITMechanicW/O #ActivityClassificationStatus
1212Anthony Ayou4525bootBDNOn Hold
1236joan52455engine8646Completed
2122jim654541415151On Hold
4152Bratish Panjara48258556446Running RepairTSS
I'm stumped,
At the end of the day I would like to clear the contents of the line that has "completed" in the last column. and I would like for the table to auto sort.
The "status" column is a drop down if that makes a difference.
Keep in mind this part of my report is 74 lines long.
This spreadsheet has more columns and rows beside and under what you see, (so I do not want to delete rows for those reasons).
I need help please and thank you.
 
So I got the formula, but now I need to modify it a bit. If I want one of 2 values "Completed" or "Tripped"

How would I write that?


Sub Repairs()
'create loop through column F (assuming that's where the Status col. is)
Dim c As Range
For Each c In Range("F475:F507")
If c.Value = "Completed" Then
'will clear the active row's columns A through F
Range(Cells(c.Row, 1), Cells(c.Row, 6)).ClearContents
End If
Next c
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Similar threads

Forum statistics

Threads
1,216,746
Messages
6,132,479
Members
449,729
Latest member
davelevnt

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