Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 434
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
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?


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
Deleting numbers in a string Cheri Excel Discussion (Misc queries) 5 June 19th 07 10:12 PM
Deleting Duplicate Numbers In A Column: How ? Robert11 New Users to Excel 1 September 26th 06 01:15 PM
Deleting/rasing a column of numbers?? Skip Excel Worksheet Functions 1 May 15th 06 03:28 AM
deleting numbers in a column roddtx New Users to Excel 3 March 17th 06 07:30 PM
Deleting characters that are not numbers jermsalerms Excel Discussion (Misc queries) 4 January 12th 06 08:06 PM


All times are GMT +1. The time now is 12:28 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"