Delete a row if a cell contains ANY Date

Sandy01UK

New Member
Joined
Apr 16, 2013
Messages
19
Hi

I've tried several solutions for this and cant seem t get it to work!

In my spread sheet I have column T (Dispatch date) this cell returns a date (dd/mm/yy) given the formula

if(Q2<>""Q2,IF(R2<>""R2,IF(S2<>",S2,"")))

I need to loop through column T d delete ANY date.

I have tried

Column("T").SpecialCells(xlCellTypeConstants).EntirRow.Delete

Along with others with no success.

My Data has headers.

On the same note I later need to copy the raw data and need to delete all the blanks.

I'm struggling with this as well

Any suggestions would be gratefully received

Once again thanks for your patience.

Sandy
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this on a copy of your sheet

Code:
Sub atest()
Dim LR As Long, i As Long
LR = Range("T" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
    If IsDate(Range("T" & i).Value) Then Rows(i).Delete
Next i
End Sub
 
Upvote 0
Hi Thanks for this it works a treat any suggestions for deleting the blanks/cells with formulas?


Thanks Again

Sandy
 
Upvote 0

Forum statistics

Threads
1,225,606
Messages
6,185,952
Members
453,333
Latest member
BioCoder84

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