Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default remove row with some data not exact

I have a spreadsheet that I want to delete the entire row if it contains
04-29-2010 but there is a time stamp that changes after that.

How do I delete all the rows containing 04-29-2010 with random data after?

Thanks in advance for your brilliance!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default remove row with some data not exact

Assumes valid dates & times are in Column A with Range A1 being a heading;

Sub DoIt()
Dim lRow As Long

With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
On Error Resume Next
For lRow = Cells(Rows.Count, "A").End(xlUp).Row To 2
If Int(Cells(lRow, "A")) _
= DateSerial(2010, 4, 29) Then _
Cells(lRow, "A").EntireRow.Delete
Next lRow
On Error GoTo 0
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"Poohberry" wrote in message
...
I have a spreadsheet that I want to delete the entire row if it contains
04-29-2010 but there is a time stamp that changes after that.

How do I delete all the rows containing 04-29-2010 with random data after?

Thanks in advance for your brilliance!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default remove row with some data not exact

04-29-2010 10:53:03 AM
39 / 1417

that is an example it was a txt file now a .csv opened in excel 07 all on
column a

"ozgrid.com" wrote:

Assumes valid dates & times are in Column A with Range A1 being a heading;

Sub DoIt()
Dim lRow As Long

With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
On Error Resume Next
For lRow = Cells(Rows.Count, "A").End(xlUp).Row To 2
If Int(Cells(lRow, "A")) _
= DateSerial(2010, 4, 29) Then _
Cells(lRow, "A").EntireRow.Delete
Next lRow
On Error GoTo 0
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"Poohberry" wrote in message
...
I have a spreadsheet that I want to delete the entire row if it contains
04-29-2010 but there is a time stamp that changes after that.

How do I delete all the rows containing 04-29-2010 with random data after?

Thanks in advance for your brilliance!


.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default remove row with some data not exact

Step1: For time-being, you can change cell formatting such way that it does
not show time but only shows date in mm-dd-yyyy format.

Step2: Apply data filter

Step3: From filter drop-down, select/filter to show dates that you want to
delete.

Step4: Select all visible/filtered lines and say Delete, it will ask if you
want to delete entire row?, say yes.
--
Regards,
Pritesh


"Poohberry" wrote:

I have a spreadsheet that I want to delete the entire row if it contains
04-29-2010 but there is a time stamp that changes after that.

How do I delete all the rows containing 04-29-2010 with random data after?

Thanks in advance for your brilliance!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default remove row with some data not exact

I actualy need to remove the data filtering it will confuse people, I need it
to just be gone.

"Pritesh" wrote:

Step1: For time-being, you can change cell formatting such way that it does
not show time but only shows date in mm-dd-yyyy format.

Step2: Apply data filter

Step3: From filter drop-down, select/filter to show dates that you want to
delete.

Step4: Select all visible/filtered lines and say Delete, it will ask if you
want to delete entire row?, say yes.
--
Regards,
Pritesh


"Poohberry" wrote:

I have a spreadsheet that I want to delete the entire row if it contains
04-29-2010 but there is a time stamp that changes after that.

How do I delete all the rows containing 04-29-2010 with random data after?

Thanks in advance for your brilliance!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
look up and match exact data is adjacent column Craig New Users to Excel 1 October 15th 09 08:41 PM
Routine to find exact Row matches in Col1 Col2 Col3 but exact offsetting numbers in Col4 [email protected] Excel Discussion (Misc queries) 0 June 11th 08 11:30 PM
exact value from supplied Row and Column data [email protected] Excel Worksheet Functions 1 November 16th 06 07:57 PM
data that matches exact column and row raraschek Excel Worksheet Functions 4 January 23rd 06 08:06 PM
matching a sorting the exact value in the data list Steve M Excel Discussion (Misc queries) 1 June 16th 05 08:38 PM


All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"