Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
rgtest
 
Posts: n/a
Default Can I delete blank rows from excel without selecting them?

I exported data from a Crystal Report into Excel. During the export process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null values
or space?

Thanks
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

The easiest way is to select all the cells and then sort, which puts blanks (depends on what you
mean by NULL values) to the bottom. Of course, if you sort, that would change the order, so
sometimes a macro like this might be better, which will delete any row where column A is truly
blank:

Sub DeleteRowsBasedOnBlankCellsInColumnA()
On Error Resume Next
Columns("A:A").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null values
or space?

Thanks



  #3   Report Post  
Ken Wright
 
Posts: n/a
Default

Select a column where you can be SURE that a blank cell means you want to
delete that row. Select the whole column, do edit / Go to / Special /
blanks, then hit edit / delete / entire row

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Can I delete blank rows from excel without selecting them?

Where are these "do edit /Go to / special" commands? Are they entered in
macro or is this from a pull down menu. Can you be more specific?

"Ken Wright" wrote:

Select a column where you can be SURE that a blank cell means you want to
delete that row. Select the whole column, do edit / Go to / Special /
blanks, then hit edit / delete / entire row

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Can I delete blank rows from excel without selecting them?

BTW, I checked the date of this post... I am using office 2007.

"Ken Wright" wrote:

Select a column where you can be SURE that a blank cell means you want to
delete that row. Select the whole column, do edit / Go to / Special /
blanks, then hit edit / delete / entire row

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Can I delete blank rows from excel without selecting them?

Hi,

Ctrl+G Special.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dael" wrote in message
...
BTW, I checked the date of this post... I am using office 2007.

"Ken Wright" wrote:

Select a column where you can be SURE that a blank cell means you want to
delete that row. Select the whole column, do edit / Go to / Special /
blanks, then hit edit / delete / entire row

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like
to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without
selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Can I delete blank rows from excel without selecting them?

I don't know what the date of your post has to do with anything. However,
Office 2007 is definitely germaine because it has a completely different
user interface than previous verions. In 2007, do the following:

HomeEditingFind & SelectGo to Special...Blanks
HomeCellsDelete Sheet Rows

In the future, specify that you have 2007 right at the start, so the answers
can be tailored to your situation.

Regards,
Fred.

"Dael" wrote in message
...
BTW, I checked the date of this post... I am using office 2007.

"Ken Wright" wrote:

Select a column where you can be SURE that a blank cell means you want to
delete that row. Select the whole column, do edit / Go to / Special /
blanks, then hit edit / delete / entire row

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like
to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without
selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Can I delete blank rows from excel without selecting them?

I have a similar problem with an import into Excel2007. 45,000+ rows
populating just col A & B and I wish to delete only rows where both col A and
col B are blank. I tried modifying the sub below to the range "A:B" but
deletes everything. Can someone help?

"Bernie Deitrick" wrote:

The easiest way is to select all the cells and then sort, which puts blanks (depends on what you
mean by NULL values) to the bottom. Of course, if you sort, that would change the order, so
sometimes a macro like this might be better, which will delete any row where column A is truly
blank:

Sub DeleteRowsBasedOnBlankCellsInColumnA()
On Error Resume Next
Columns("A:A").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export process
extra fields and and columns were added to the data set. I would like to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without selecting
each row? For example, could I run a script to delete rows with null values
or space?

Thanks




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Can I delete blank rows from excel without selecting them?

First, you're far better off to start a new thread for problems like this.
Attaching your message to a thread that's over two months old significantly
limits the help you might get. Most people don't look at threads this old.

Second, if this is a one-time requirement, I would use the Data Filter.
Select all the blank rows in Column A, then the blank rows in Column B. Now
you have only the rows where both A and B are blank. Now delete them.

Regards,
Fred.

"OzWaz" wrote in message
...
I have a similar problem with an import into Excel2007. 45,000+ rows
populating just col A & B and I wish to delete only rows where both col A
and
col B are blank. I tried modifying the sub below to the range "A:B" but
deletes everything. Can someone help?

"Bernie Deitrick" wrote:

The easiest way is to select all the cells and then sort, which puts
blanks (depends on what you
mean by NULL values) to the bottom. Of course, if you sort, that would
change the order, so
sometimes a macro like this might be better, which will delete any row
where column A is truly
blank:

Sub DeleteRowsBasedOnBlankCellsInColumnA()
On Error Resume Next
Columns("A:A").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like
to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without
selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks





  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Can I delete blank rows from excel without selecting them?

One way would be to use datafilterautofilterfilter both on blanks. I just
recorded this. Clean it up to remove selections

Sub Macro1()
'
' Macro1 Macro
'

'

Range("A1:B8").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$B$8").AutoFilter Field:=1, Criteria1:="="
ActiveSheet.Range("$A$1:$B$8").AutoFilter Field:=2, Criteria1:="="
Range("A2:B6").Select
Selection.EntireRow.Delete
Selection.AutoFilter
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"OzWaz" wrote in message
...
I have a similar problem with an import into Excel2007. 45,000+ rows
populating just col A & B and I wish to delete only rows where both col A
and
col B are blank. I tried modifying the sub below to the range "A:B" but
deletes everything. Can someone help?

"Bernie Deitrick" wrote:

The easiest way is to select all the cells and then sort, which puts
blanks (depends on what you
mean by NULL values) to the bottom. Of course, if you sort, that would
change the order, so
sometimes a macro like this might be better, which will delete any row
where column A is truly
blank:

Sub DeleteRowsBasedOnBlankCellsInColumnA()
On Error Resume Next
Columns("A:A").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"rgtest" wrote in message
...
I exported data from a Crystal Report into Excel. During the export
process
extra fields and and columns were added to the data set. I would like
to
delete the blank rows that were inserted between every record from my
spreadsheet.

Is there a way to delete extra rows from a spreadsheet without
selecting
each row? For example, could I run a script to delete rows with null
values
or space?

Thanks





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
I want to delete multiple blank rows from a spreadsheet Sharon43 New Users to Excel 2 October 8th 05 12:44 AM
In a protected worksheet allow users to delete rows Jason Trivett Excel Worksheet Functions 1 July 12th 05 09:50 AM
How can I delete rows from Pivot Tables in Excel 2000 as in 97 Rex at B$4U Excel Discussion (Misc queries) 0 April 18th 05 04:55 AM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM
No Smart Tag help: just a blank "MS Excel Help" window - Excel 2003 Ian Ripsher Excel Discussion (Misc queries) 0 November 26th 04 08:43 PM


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

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"