Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing Empty Rows and selecting Specific Rows


I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need t
do.

This entire column of email addresses is separated by 2 empty row
between each email address.

1) Instead of clicking on each one and deleting them one by one, i
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example
" Do you see the extra space in front of the emai
address?

How do I remove that single space with some sort of shortcut for th
entire column?

Appreciate the help,

J

--
Jethea
-----------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...fo&userid=1007
View this thread: http://www.excelforum.com/showthread.php?threadid=39511

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Removing Empty Rows and selecting Specific Rows

Hi Jetheat!

This is a pretty easy and common task. The trick here is to delete rows
bottom up. You may try the following macro, see the comments to make the
adjustments you need, and *SAVE* your workbook before playing with it:

Sub DeleteEmptyRows()
Dim i As Integer 'Long if last row number 32767

'Assuming the list is in the first worksheet
With ThisWorkbook.Worksheets(1)
'Substitute 1000 by the number of the last empty row
For i = 1000 To 1 Step -1
'Assuming data is on the first column
'Assuming first cell on the row is really empty
If .Cells(i, 1) = "" Then .Rows(i).Delete
Next i
End With
End Sub

Best,

Rafael

"Jetheat" wrote:


I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need to
do.

This entire column of email addresses is separated by 2 empty rows
between each email address.

1) Instead of clicking on each one and deleting them one by one, is
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example "
" Do you see the extra space in front of the email
address?

How do I remove that single space with some sort of shortcut for the
entire column?

Appreciate the help,

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Removing Empty Rows and selecting Specific Rows

Sorry Jetheat, I forgot to mention that another easy way of doing it is
turning the auto filter on and then selecting non-blanks cells. Do that and
copy the filtered list to other worksheet. It's easier if you're not used to
VBA...

Best,

Rafael

"Jetheat" wrote:


I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need to
do.

This entire column of email addresses is separated by 2 empty rows
between each email address.

1) Instead of clicking on each one and deleting them one by one, is
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example "
" Do you see the extra space in front of the email
address?

How do I remove that single space with some sort of shortcut for the
entire column?

Appreciate the help,

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing Empty Rows and selecting Specific Rows


Thanks Rafael, thats great. I used the second method coz I don't even
know how to get into VBA.

Anyway, now I have a slightly different problem which hopefully you can
help with.

I have 2 columns of email addresses. I have imported them from
different sources.

I need to remove the duplicate entries so I placed one set under the
other.

Then I tried the Filter ~ Advanced Filter trick.

It didn't remove any because I found that the 2nd set does not match
the first set because it has a lot of trailing edge spaces after the
email address.

What can I do to remove these trailing edge spaces and make them the
same as the 1st set?

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile: http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Removing Empty Rows and selecting Specific Rows

And there is any easier way.

Select all the used rows in a single column (where the empty cells are
representative of all the data)
goto the Edit menu and select GoTo, select Special, select Blanks.
Than go to the Edit menu and select Delete, select Entire Rows.

This is pretty quick and works great....

--
steveB

Remove "AYN" from email to respond
"Jetheat" wrote in
message ...

I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need to
do.

This entire column of email addresses is separated by 2 empty rows
between each email address.

1) Instead of clicking on each one and deleting them one by one, is
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example "
" Do you see the extra space in front of the email
address?

How do I remove that single space with some sort of shortcut for the
entire column?

Appreciate the help,

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Removing Empty Rows and selecting Specific Rows

That´s what I like the most in Excel, many ways of doing the same thing!

By the way, I just noticed we forgot to answer the second part of Jethead's
question. To eliminate leading spaces (and trailing as well) use the TRIM
function.

Regards,

Rafael

"STEVE BELL" wrote:

And there is any easier way.

Select all the used rows in a single column (where the empty cells are
representative of all the data)
goto the Edit menu and select GoTo, select Special, select Blanks.
Than go to the Edit menu and select Delete, select Entire Rows.

This is pretty quick and works great....

--
steveB

Remove "AYN" from email to respond
"Jetheat" wrote in
message ...

I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need to
do.

This entire column of email addresses is separated by 2 empty rows
between each email address.

1) Instead of clicking on each one and deleting them one by one, is
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example "
" Do you see the extra space in front of the email
address?

How do I remove that single space with some sort of shortcut for the
entire column?

Appreciate the help,

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Removing Empty Rows and selecting Specific Rows

Yep!

Get 3 people in a room and you can get 30 possible solutions to the same
problem...

--
steveB

Remove "AYN" from email to respond
"Rafael Guerreiro Osorio"
wrote in message ...
That´s what I like the most in Excel, many ways of doing the same thing!

By the way, I just noticed we forgot to answer the second part of
Jethead's
question. To eliminate leading spaces (and trailing as well) use the TRIM
function.

Regards,

Rafael

"STEVE BELL" wrote:

And there is any easier way.

Select all the used rows in a single column (where the empty cells are
representative of all the data)
goto the Edit menu and select GoTo, select Special, select Blanks.
Than go to the Edit menu and select Delete, select Entire Rows.

This is pretty quick and works great....

--
steveB

Remove "AYN" from email to respond
"Jetheat" wrote in
message ...

I have a list of email addresses in one single column.

This list is large so I need some way of shortcutting what I need to
do.

This entire column of email addresses is separated by 2 empty rows
between each email address.

1) Instead of clicking on each one and deleting them one by one, is
there a quicker method to delete all empty rows?

2) The list of email addresses is imported.
All the emaill addresses have a space in front of them. For example "
" Do you see the extra space in front of the email
address?

How do I remove that single space with some sort of shortcut for the
entire column?

Appreciate the help,

JH


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile:
http://www.excelforum.com/member.php...o&userid=10073
View this thread:
http://www.excelforum.com/showthread...hreadid=395116






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Removing Empty Rows and selecting Specific Rows


Thanks for the help guys, all working

Super


--
Jetheat
------------------------------------------------------------------------
Jetheat's Profile: http://www.excelforum.com/member.php...o&userid=10073
View this thread: http://www.excelforum.com/showthread...hreadid=395116

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
Selecting only specific rows for a Sort mkflirting Excel Discussion (Misc queries) 1 April 14th 10 06:27 PM
removing specific rows in a worksheet Louise Excel Discussion (Misc queries) 9 January 22nd 09 05:50 PM
Macro for removing specific rows and columns, freezing panes..? [email protected] Excel Worksheet Functions 3 April 6th 08 11:51 PM
selecting specific rows with a algorithym!? ffcmello Excel Worksheet Functions 2 January 31st 08 05:09 PM
Removing Empty Rows from Worksheets Gareth - Network analyst. Excel Discussion (Misc queries) 2 August 8th 07 09:59 PM


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

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

About Us

"It's about Microsoft Excel"