A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

deleting numbers in a column



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2010, 03:15 AM posted to microsoft.public.excel.worksheet.functions
Calvinator
external usenet poster
 
Posts: 1
Default deleting numbers in a column

One of my columns should be only text. I converted pdf file of 30,000
records to excel. One of my columns ended with some student id #s in the
ethnicity column. Can I do something to cause each cell in the column to go
blank if it contains a number?
  #2  
Old January 4th, 2010, 05:46 AM posted to microsoft.public.excel.worksheet.functions
Héctor Miguel
external usenet poster
 
Posts: 298
Default deleting numbers in a column

hi, !

One of my columns should be only text.
I converted pdf file of 30,000 records to excel.
One of my columns ended with some student id #s in the ethnicity column.
Can I do something to cause each cell in the column to go blank if it contains a number?


you might give a try a macro like following one ?
(assuming "the column" is B and row1 has titles, so data begins in [B2] and NO blank cells between)

Sub Clear_If_Number()
With Range("b2") ' = modify if real data begins in a different cell '
.Offset(, 1).EntireColumn.Insert
With Range(.Offset, .End(xlDown))
.Offset(, 1).Formula = _
"=sumproduct(--isnumber(search({0;1;2;3;4;5;6;7;8;9}," & .Cells(1).Address(0, 0) & ")))"
.Offset(-1).Resize(.Rows.Count + 1, 2).AutoFilter Field:=2, Criteria1:="0"
.Offset(1).SpecialCells(xlCellTypeVisible).ClearCo ntents
End With
.AutoFilter
.Offset(, 1).EntireColumn.Delete
Debug.Print .Parent.UsedRange.Address
End With
End Sub

hth,
hector.


  #3  
Old January 4th, 2010, 08:17 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default deleting numbers in a column

Hi,

Select the column and press Ctrl+G Special Constants Numbers and then
click on OK. This will select all the numbers. Now simply hot the delete
button

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Calvinator" wrote in message
...
One of my columns should be only text. I converted pdf file of 30,000
records to excel. One of my columns ended with some student id #s in the
ethnicity column. Can I do something to cause each cell in the column to
go
blank if it contains a number?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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