Removing blank rows #7

I noted a post in January where someone wanted to insert blank rows in
every other row of a worksheet

I've got the reverse issue.

A database created from a text input has a blank row from the original
double-spacing - but not every second row.

How do I remove blank rows in 50,000 lines of data?

I don't know whether he blank rows carry some baggage from the
conversion - was a copy out of a text file with space-separated values
and double CR between lines (rows).

This is for someone wanting a semiconductor data list that can
eventually be sorted by column values. Will work as is, but is twice
as big as needed.

When currently sorted, the blank rows are not shifted out of the
tables.

RL
0
legg (9)
4/29/2008 8:10:03 PM
excel 39879 articles. 2 followers. Follow

8 Replies
733 Views

Similar Articles

[PageSpeed] 54

What happens if you (or that someone) just sorts the data?

Don't the "blanks" get sorted to the top or the bottom--or at least grouped
together?



legg wrote:
> 
> I noted a post in January where someone wanted to insert blank rows in
> every other row of a worksheet
> 
> I've got the reverse issue.
> 
> A database created from a text input has a blank row from the original
> double-spacing - but not every second row.
> 
> How do I remove blank rows in 50,000 lines of data?
> 
> I don't know whether he blank rows carry some baggage from the
> conversion - was a copy out of a text file with space-separated values
> and double CR between lines (rows).
> 
> This is for someone wanting a semiconductor data list that can
> eventually be sorted by column values. Will work as is, but is twice
> as big as needed.
> 
> When currently sorted, the blank rows are not shifted out of the
> tables.
> 
> RL

-- 

Dave Peterson
0
petersod (12004)
4/29/2008 8:45:35 PM
If the rows do not sort out then you are probably correct in surmising some type
of baggage in blank cells.

Sub TRIM_EXTRA_SPACES()
Dim Cell As Range
    For Each Cell In Selection
        If (Not IsEmpty(Cell)) And _
                Not IsNumeric(Cell.Value) And _
                InStr(Cell.Formula, "=") = 0 _
                Then Cell.Value = Application.Trim(Cell.Value)
    Next
End Sub

Note:  if the baggage is is the non-breaking space character 160 you can try an
Edit>Replace

what:  Alt + 0160 (on numpad)

with:  nothing

replace all

When done, F5>Special>Blanks>OK>Edit>Delete>Entire Rows


Gord Dibben  MS Excel MVP

On Tue, 29 Apr 2008 16:10:03 -0400, legg <legg@nospam.magma.ca> wrote:

>I noted a post in January where someone wanted to insert blank rows in
>every other row of a worksheet
>
>I've got the reverse issue.
>
>A database created from a text input has a blank row from the original
>double-spacing - but not every second row.
>
>How do I remove blank rows in 50,000 lines of data?
>
>I don't know whether he blank rows carry some baggage from the
>conversion - was a copy out of a text file with space-separated values
>and double CR between lines (rows).
>
>This is for someone wanting a semiconductor data list that can
>eventually be sorted by column values. Will work as is, but is twice
>as big as needed.
>
>When currently sorted, the blank rows are not shifted out of the
>tables.
>
>RL

0
Gord
4/29/2008 8:57:30 PM
On Tue, 29 Apr 2008 15:45:35 -0500, Dave Peterson
<petersod@verizonXSPAM.net> wrote:

>What happens if you (or that someone) just sorts the data?
>
>Don't the "blanks" get sorted to the top or the bottom--or at least grouped
>together?
>
Actually, it's even worse than I thought. 

A worksheet won't sort. Tried reversing order (12,000 lines) without
effect.

Text should at least sort in alpha-numerical order, from my
experience.

yow

RL 
0
legg (9)
4/29/2008 9:41:22 PM
Are you selecting the range to sort or allowing excel to guess what it should
be.

If you're not selecting the range first, try that.  Excel can often guess
wrong--especially with blank rows and/or blank columns.

legg wrote:
> 
> On Tue, 29 Apr 2008 15:45:35 -0500, Dave Peterson
> <petersod@verizonXSPAM.net> wrote:
> 
> >What happens if you (or that someone) just sorts the data?
> >
> >Don't the "blanks" get sorted to the top or the bottom--or at least grouped
> >together?
> >
> Actually, it's even worse than I thought.
> 
> A worksheet won't sort. Tried reversing order (12,000 lines) without
> effect.
> 
> Text should at least sort in alpha-numerical order, from my
> experience.
> 
> yow
> 
> RL

-- 

Dave Peterson
0
petersod (12004)
4/29/2008 9:49:40 PM
On Tue, 29 Apr 2008 13:57:30 -0700, Gord Dibben <gorddibbATshawDOTca>
wrote:

>If the rows do not sort out then you are probably correct in surmising some type
>of baggage in blank cells.
>
>Sub TRIM_EXTRA_SPACES()
>Dim Cell As Range
>    For Each Cell In Selection
>        If (Not IsEmpty(Cell)) And _
>                Not IsNumeric(Cell.Value) And _
>                InStr(Cell.Formula, "=") = 0 _
>                Then Cell.Value = Application.Trim(Cell.Value)
>    Next
>End Sub
>
>Note:  if the baggage is is the non-breaking space character 160 you can try an
>Edit>Replace
>
>what:  Alt + 0160 (on numpad)
>
>with:  nothing
>
>replace all
>
>When done, F5>Special>Blanks>OK>Edit>Delete>Entire Rows
>
>
>Gord Dibben  MS Excel MVP

I tried the macro. Got a long wait, but no apparent effect or change
in sorting behavior.

The edit function can't to find the character, in the sheet or
selected lines.

RL
0
legg (9)
4/29/2008 10:02:00 PM
Hi,
Do you really have blank XL rows between you data, or do you have a blank 
line at the bottom of each XL row?
Dave
0
dave871 (679)
4/29/2008 10:05:01 PM
On Tue, 29 Apr 2008 16:49:40 -0500, Dave Peterson
<petersod@verizonXSPAM.net> wrote:

>Are you selecting the range to sort or allowing excel to guess what it should
>be.
>
>If you're not selecting the range first, try that.  Excel can often guess
>wrong--especially with blank rows and/or blank columns.

That seemed to do the trick.

With all data selected and specifying a sort by column, the blank
lines got ousted without losing row association.

Many thanks.

RL
0
legg (9)
4/29/2008 10:11:15 PM
On Tue, 29 Apr 2008 15:05:01 -0700, Dave
<Dave@discussions.microsoft.com> wrote:

>Hi,
>Do you really have blank XL rows between you data, or do you have a blank 
>line at the bottom of each XL row?
>Dave

No, it was a new enumerated line, and not grouped or associated with
the preceding line. Selecting all of the data on the page and sorting
by selected column got rid of the blanks in a trial worksheet.

I was used to just having to pick a single column cell to do this
previously. 

12000 lines are now 6000 without loss of row associations.

Thanks for the help.

RL
0
legg (9)
4/29/2008 10:30:07 PM
Reply:

Similar Artilces:

Remove Excel Icon ??
Hi, I would like to remove the possibility to export data in Excel. I think I already read it's impossible but I just want to confirm. Thanks, Sylvie Your correct, there is no supported way to do this in the current release of Microsoft CRM 1.2 -- John O'Donnell Microsoft CRM MVP http://www.microsoft.com/BusinessSolutions/Community/CRMFaqLanding.aspx "sylvie" <sylvie.mondoux@proximi-t.com> wrote in message news:09dd01c47b03$d3627560$a301280a@phx.gbl... > Hi, > > I would like to remove the possibility to export data in > Excel. I think I already rea...

How to pull every tenth row of information out of a 5,000-row spreadsheet?
At work, we're doing a poll of 500 people, and we've got a list of 5,000 = potential people to contact in a vast, 5,000-row Microsoft Excel=20 spreadsheet. =20 Is there a way to run a query or a macro or something that will=20 automatically go in and select every tenth row on this document and=20 either erase the intervening rows and move all the remaining to the=20 top, and/or copy the contents of every tenth row into a new document=20 (but without nine blank rows between each row?) =20 We're using Microsoft Excel v.X on Mac OS X Jaguar. =20 Most of what we do is graphic desig...

Removal
How do I completely remove all traces of Outlook 2002 for a complete fresh reinstall. I can't find anything for '02. HELP!!!!!!!!!!!!!!!!! ...

how do I remove spaces from cells that were pasted
I am pasting numbers into a spreadsheet, however its treating them as text because there is a space before the number. How do I remove the space so it treats it as a number ? I have used the =trim() function and its not working. Thanks for any help ! Hi! It sounds like you're copy/pasting from a website. Try this macro from David McRitchie. Look for TRIMALL, it's about half way down the page: http://www.mvps.org/dmcritchie/excel/join.htm Biff >-----Original Message----- >I am pasting numbers into a spreadsheet, however its treating them as text >because there is a...

Remove lines with +++
Is there anyway to find any line that has a + in it and delete that whole line?! I'd also like to do the same for *. I have a list of about 1300-1500 names and addresses. Some of them have a few +++ next to the name and some of them have a few *** next to the name. These were put there by the company to designate things. They need to be removed from the list, but it's a lost of work doing it one by one. You could apply an autofilter to the column with these characters in and from the pull-down select Custom - in the panel choose "Contains" (scroll down for this) the...

How to Remove SRS
How to I remove or disable Site Replication Service (SRS) from my Exchange 2003? Thank You, Jason HI Remove the SRS by expanding the Tools node in ESM, right-clicking Site Replication Service, and clicking Delete "jpollock" wrote: > How to I remove or disable Site Replication Service (SRS) from my Exchange > 2003? > > Thank You, > > Jason > > And make sure you are doing it while logged in to the console of the Exchange server on which the SRS is running. -- Jim McBee Web: http://www.somorita.com Blog: http://mostlyexchange.blogspot.com &...

allmost done with removing our 1st exchange 03 server
We are in the process of removing the 1st exchange server in our domain. Everything has been replicated over to a new server and all mailboxes have been moved. When we shut down the original server down, email still works great for 90% of the team. For the rest of us, when type the name of person to receive an email, outlook it still tries to resolve the name on the original server. I checked the profile on the users mailbox and it shows them pointing to the new server. Any suggestions would be appreciated. Try creating a new Outlook profile. Also, when you shut down you're...

Message title is blank
Using Outlook 2000, I have noted lately that when I reply to an email stored in my pst file, the information does not have a subject line or a message text from me as it supposed to have. It is just an envelope that is blank. Any idea what is causing this behavior and how to resolve this? It does not happen from my mailbox itself but only from my pst files that are stored on the network. ...

remove Fax from address book?
Is there a way to stop showing Fax in the address book? I have a lot of fax numbers in my Contacts. I do not want to loose them - just not show them in the Address Book. thx Outlook considers fax numbers to be valid electronic addresses, since there are many client- and server-based components that can use such addresses. One method to hide fax numbers from the address book is to prefix the fax number with one or more letters (maybe B for business fax, H for home, O for other). If the fax number begins with a letter, Outlook won't show it in the address book. There are a couple of t...

Windows 7 does not prompt to change expiring password
We are currently upgrading all of our users to windows 7. One thing we have noticed is that they are no longer getting alerts to reset their password before it expires. If they log into a Server 2003 or an XP machine, they get the alert. Please let me know if there is a fix for this problem. Thanks. On 28/05/2010 19:07, braydonsdad@gmail.com wrote: > We are currently upgrading all of our users to windows 7. One thing > we have noticed is that they are no longer getting alerts to reset > their password before it expires. If they log into a Server 2003 or > an XP mach...

Removing an item from menu
How can I remove an item from the menu and add some thing else. For instance, how can I remove inactive from the menu in contact page and put some other item with my own code behind it? You can hide the public views by simply creating a team (non used views or whatever you want to name it) and share the view to that team(done in the customize entity fields in the forms and views), this will make it a private view that only members of that team can see. You can also create new public or private views in the same place. "Amin" wrote: > How can I remove an item from the m...

Cannot Remove a program from Add Remove via remove.
I downloaded a program Fast At Last and it did not download properly and I could not remove it. Even System Restore did not remove it. The program is listed as 924PL32. Kept getting messages The feature you are trying to use is on a network resource that is unavailable. C:\dell\GC605. Seems Dell is the publisher but they would not give me free support on this issue. Any suggestions as to how I can remove the program? I believe it may be associated with spyware. When I ran spysweeper it removed some Rouge Security products but I still cannot remove this program. Cor...

Need to remove selected characters
I have 25000 cells with map coordinates in it in the following format: N34* 51.87' I need the data in the following format: N55 13.26 So basically I need to strip out the * and ' from each cell. Any simple way to do this? I sure would appreciate any assistance. Thank you -- Dale Hi! Select the range of cells in question. Goto Edit>Rplace Find what: ~* Replace with: nothing, leave this blank Replace All Repeat the process for the ' It's VERY important that you select the specific range before you attempt this!!!!!!! Biff "Natedanger" <Natedanger@d...

Remove deduction code from payroll stub
Is it possible to remove just a single payroll deduction code from a payroll stub using 'Employee Checks Stub on Top-D'? For example, an employee has three deductions: Insurance, 401k, Medical. Would it be possible then to show insurance and 401k but leave medical off the check stub for all employees who have medical? Thanks in advance for your help! I don't believe so because the deduction field is an array so you'd have to know which array value. Even if you did, I don't think you can use arrays in report restrictions. -- Charles Allen, MVP "drose03...

How to Remove Yahoo toolbar
I have three toolbars installed on IE8-Yahoo (to the right of the address box), and Google and AVG below the address box. I want to uninstall the Yahoo toolbar but how? It is not listed under 'Add/Remove' programs and there is a magnifying glass and arrow to the right of this toolbar that says 'Manage search providers' so I removed Yahoo toolbar from there but it is still showing. I uninstalled Yahoo messenger (since the toolbar was included during the Messenger install so it would be removed by deleting Messenger) but it is still there. I know that for AV...

Removing password protection on a sheet
A co-worker of mine protected a sheet in her workbook but lost th password. I help her with formula/script issues and I thought I coul simply copy the data on this sheet and paste it to another sheet to ge around it, but it won't let me select anything other than a few cell (based on the cells settings I'm sure). I know that Microsoft doesn' support removal of passwords when you don't know the password (make sense from a secuity standpoint) but was hoping someone could help m out here. She can remake it if need be but thought I'd ask ;) Thanks -- Otto.ts ------------...

In Excel is it possible to hide a row condtional upon a cell val..
In Excel is it possible to hide a row condtional upon a cell value? with a macro yes,or you could format white text and all values would disapear. -- paul remove nospam for email addy! "Louise" wrote: > In Excel is it possible to hide a row condtional upon a cell value? The white text makes the text disappear, but not the entire row or column of cells. With a macro, is it possible to make the cells automatically unhide then if the data becomes relevant again due to changes? "paul" wrote: > with a macro yes,or you could format white text and all values woul...

Inbox Email Show Blank From Field
Can anyone help with this problem please. Some Inbox email show a blank From Field. The messages are from internal users and are not spam. Also the from field is viewable in the preview pane and when opening the message but not in folder view. I've tried restting the folder view but to no avail. Also when the message is copied into another mailbox or a pst the From field remains blank in the folder view. Client is Outlook 2002 SP2. Server software is Exchange 2003 SP1 on Windows 2003 Standard. Thanks, Phil ...

Removing old computers connector exchange 2003
Hi, I have a new exc 2003 server that is working fine. i keep getting errors in the event log that it cannot connect to an old exchange server that was removed. for some reason, in the connectors, i can see two connectors that point for the old server. connector for ms scheduleplus(oldservername) connector for ms mail (oldservername) i cannot delete them from there. what can i do? Omer On 4 Oct 2006 23:43:14 -0700, "etgarnet" <etgarnet@zahav.net.il> wrote: >Hi, > >I have a new exc 2003 server that is working fine. >i keep getting errors in the event log that ...

on last enter start new blank form
is there a way to have a new blank form start after entering last input of information? Thanks in advance for the help! If you set the form's property to add new records, and add a <Save> command button, you should get "a new blank form". If you're asking how to have it happen without the <Save> button, how will Access "know" when you're finished entering data? Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a produ...

Windows 7 Question 06-03-10
I cannot find a newsgroup that answers Windows 7 questions. If there is a newsgroup for Windows 7, can you please tell me the name? We are upgrading from Windows XP to Windows 7. We have a fileserver (running Server 2003 SP2) where our users' documents are stored. We configure the user's folder with their last name, such as Smith. After we complete the configuration of the Windows 7 computer, I notice that the folder name on our fileserver has changed, say to Jones, but the share name is still Smith. So I have multiple folders on our fileserver with the folder nam...

Adding and removing removable drives
Hello NG, I wrote an FolderView ActiveX control. How can I receive a notification for adding or removing drives for example usb sticks or other media? And how can I receive a notification to refresh network shares? Speial thanks for help. Thomas Bendrich Is this what you are looking for DBT_DEVNODES_CHANGED. AliR. "Thomas Bendrich" <admin@thb-net.com> wrote in message news:u7Gb2wjuFHA.2312@TK2MSFTNGP14.phx.gbl... > Hello NG, > > I wrote an FolderView ActiveX control. How can I receive a notification for > adding or removing drives for example usb sticks or ...

Grouping multiple rows
I am trying to make a report in Excel from data that was taken from a database. I have two worksheets. The first contains my raw data, which is in the form of one row per record. The second is my report. In the report, I would like to have multiple rows for each record, so that I can conserve horizontal space. There are two things I would like to do: 1) Sort my records by some field. 2) Autofill all of my records down the whole worksheet. Both of these are hard to do because I want to use 3 lines for each item, instead of one. If I fill in the references to the raw data worksheet...

how to remove print option in a particular excel file
how to remove print option in a particular excel file You can do this Copy this event in the Thisworkbook module Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True End Sub If you want to remove the print icon post back -- Regards Ron de Bruin http://www.rondebruin.nl "excel" <excel@discussions.microsoft.com> wrote in message news:C7859E37-2534-4E83-8F71-B9C3CF5C37BA@microsoft.com... > how to remove print option in a particular excel file ...

Removing Synchronised Contacts
We've a number of client pcs that have been installed with the Outlook Client pointing to a user acceptance test (UAT) system. The Outlook client has synchronized CRM contacts into their Outlook Contacts folder. How can we remove the UAT contacts? I tried to do a Find in Outlook to find the CRM specific contacts, but you don't seem to be able to find the CRM user defined fields? Strange. Any thoughts? You can see the custom CRM fields on an contact view. Choose a contact view that lists the records in a table form, such as 'Phone List'. Then, choose to customize ...