ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete row if no date exist (https://www.excelbanter.com/excel-programming/357366-delete-row-if-no-date-exist.html)

THE_RAMONES

Delete row if no date exist
 
I have a macro that combines multiple sheets into one. I want to add to the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon

Norman Jones

Delete row if no date exist
 
Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message
...
I have a macro that combines multiple sheets into one. I want to add to
the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon




THE_RAMONES

Delete row if no date exist
 
That only deletes the blank rows..Its possible to have text in the field as
well.. A column can look like

03/17/06
03/18/06
Weekly
MTD
03/08/06

03/09/06


I just want to keep the rows with dates... Thanks for the help

"Norman Jones" wrote:

Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message
...
I have a macro that combines multiple sheets into one. I want to add to
the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon





Ron de Bruin

Delete row if no date exist
 
Hi Norman

See this page for a limit test
finally found a way to test it

http://www.rondebruin.nl/specialcells.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Norman Jones" wrote in message ...
Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message ...
I have a macro that combines multiple sheets into one. I want to add to the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon






Ron de Bruin

Delete row if no date exist
 
Look in the Excel help for SpecialCells
You will see that you can use
..SpecialCells(xlCellTypeConstants, xlTextValues)


--
Regards Ron de Bruin
http://www.rondebruin.nl


"THE_RAMONES" wrote in message ...
That only deletes the blank rows..Its possible to have text in the field as
well.. A column can look like

03/17/06
03/18/06
Weekly
MTD
03/08/06

03/09/06


I just want to keep the rows with dates... Thanks for the help

"Norman Jones" wrote:

Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message
...
I have a macro that combines multiple sheets into one. I want to add to
the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon







THE_RAMONES

Delete row if no date exist
 
Thanks for the help Norman and Ron, I got it to work..

"Ron de Bruin" wrote:

Hi Norman

See this page for a limit test
finally found a way to test it

http://www.rondebruin.nl/specialcells.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Norman Jones" wrote in message ...
Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message ...
I have a macro that combines multiple sheets into one. I want to add to the
macro that once the master file is compiled, delete any row in column "A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon







Norman Jones

Delete row if no date exist
 
Hi Ron,

Very nice, Ron! And very useful too!



---
Regards,
Norman



"Ron de Bruin" wrote in message
...
Hi Norman

See this page for a limit test
finally found a way to test it

http://www.rondebruin.nl/specialcells.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Norman Jones" wrote in message
...
Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message
...
I have a macro that combines multiple sheets into one. I want to add to
the
macro that once the master file is compiled, delete any row in column
"A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon








THE_RAMONES

Delete row if no date exist
 
let me re-phase what I was trying to say.. thanks guys,, you guys got it to
work... :) Thanks again

"Norman Jones" wrote:

Hi Ron,

Very nice, Ron! And very useful too!



---
Regards,
Norman



"Ron de Bruin" wrote in message
...
Hi Norman

See this page for a limit test
finally found a way to test it

http://www.rondebruin.nl/specialcells.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Norman Jones" wrote in message
...
Hi Ramon,

Try:

'=============
Public Sub Tester()
On Error Resume Next
Columns(1).SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
'<<=============


---
Regards,
Norman



"THE_RAMONES" wrote in message
...
I have a macro that combines multiple sheets into one. I want to add to
the
macro that once the master file is compiled, delete any row in column
"A"
that doesn't have date

Basically

if A1 = 03/28/06 keep row
if A1 = null,text,etc delete row.

Thanks in advanced...

Ramon









All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com