#1   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Empty Cells

To empty cells, select them and touch the Delete key.

To remove non-numeric characters from cells, select them and run this macro:

Sub numerifyy()
For Each r In Selection
v = r.Value
L = Len(v)
s = ""
For i = 1 To L
ch = Mid(v, i, 1)
If ch Like "*[-0-9]*" Or ch = "." Then
s = s & ch
End If
Next
If Len(s) 0 Then
r.Value = --s
End If
Next
End Sub



--
Gary''s Student - gsnu200805


"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #3   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

Thanks for reply
but we get a error debug 13
Also can we select specifc cells to run macro

"Gary''s Student" wrote:

To empty cells, select them and touch the Delete key.

To remove non-numeric characters from cells, select them and run this macro:

Sub numerifyy()
For Each r In Selection
v = r.Value
L = Len(v)
s = ""
For i = 1 To L
ch = Mid(v, i, 1)
If ch Like "*[-0-9]*" Or ch = "." Then
s = s & ch
End If
Next
If Len(s) 0 Then
r.Value = --s
End If
Next
End Sub



--
Gary''s Student - gsnu200805


"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Empty Cells

Which cells?
--
Gary''s Student - gsnu200805


"dk" wrote:

Thanks for reply
but we get a error debug 13
Also can we select specifc cells to run macro

"Gary''s Student" wrote:

To empty cells, select them and touch the Delete key.

To remove non-numeric characters from cells, select them and run this macro:

Sub numerifyy()
For Each r In Selection
v = r.Value
L = Len(v)
s = ""
For i = 1 To L
ch = Mid(v, i, 1)
If ch Like "*[-0-9]*" Or ch = "." Then
s = s & ch
End If
Next
If Len(s) 0 Then
r.Value = --s
End If
Next
End Sub



--
Gary''s Student - gsnu200805


"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #5   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

the cell we want to run macro
also meantime it's crashing debug

"Gary''s Student" wrote:

Which cells?
--
Gary''s Student - gsnu200805


"dk" wrote:

Thanks for reply
but we get a error debug 13
Also can we select specifc cells to run macro

"Gary''s Student" wrote:

To empty cells, select them and touch the Delete key.

To remove non-numeric characters from cells, select them and run this macro:

Sub numerifyy()
For Each r In Selection
v = r.Value
L = Len(v)
s = ""
For i = 1 To L
ch = Mid(v, i, 1)
If ch Like "*[-0-9]*" Or ch = "." Then
s = s & ch
End If
Next
If Len(s) 0 Then
r.Value = --s
End If
Next
End Sub



--
Gary''s Student - gsnu200805


"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell




  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Empty Cells

Does this mean none of the code I gave you two days ago is of any use to
you?

Or does it mean you did not try it?


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 10:13:01 -0700, dk wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,365
Default Empty Cells

I also think that if you can provide some sample data that it will really
help those trying to help you.

There is a difference in trying to come up with a process to separate an
entry such as "abc123" and entries like
'abc-123' (is the - a dash or a negative symbol?)
or
"Tic-Tac-Toe is played on a 3x3 grid"
what's numeric and what's not in that? And if we consider x to be numeric,
that creates headaches on down the road.

Is there the possibility that a cell will be empty (as in nothing there or
displayed)?

You have 2 of the best trying to assist you now, help them to help you and
you'll get something worth having in the end.

"dk" wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell


  #8   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

no didn"t work
ex:(9-

44
^

46

47

50
51

52

921
54

56

66

-69

(4/

70



%
0

$/

83

94

44^

87 .


%


91

0
4%

94

41
95

96 ?
%

$4

"Gord Dibben" wrote:

Does this mean none of the code I gave you two days ago is of any use to
you?

Or does it mean you did not try it?


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 10:13:01 -0700, dk wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell



  #9   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Empty Cells

Works for me with your example data posted.

It won't remove the % from 4% or $4 because that is formatting.

Format the cells to general and the % and $ will go away.


Gord

On Tue, 23 Sep 2008 16:28:01 -0700, dk wrote:

no didn"t work
ex:(9-

44
^

46

47

50
51

52

921
54

56

66

-69

(4/

70



%
0

$/

83

94

44^

87 .


%


91

0
4%

94

41
95

96 ?
%

$4

"Gord Dibben" wrote:

Does this mean none of the code I gave you two days ago is of any use to
you?

Or does it mean you did not try it?


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 10:13:01 -0700, dk wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell




  #10   Report Post  
Posted to microsoft.public.excel.newusers
dk dk is offline
external usenet poster
 
Posts: 129
Default Empty Cells

Were basically scaning sheets of no. we then import to excel sometimes the
pages have slighmakrs the ocr gives all types of characters even tough it's
set only for numeric so we need to modify different types of ways sometimes
the whole range of cells is false & only the . -#$ etc is false that's what
we trying to do
this for daily use pages & pages

"Gord Dibben" wrote:

Works for me with your example data posted.

It won't remove the % from 4% or $4 because that is formatting.

Format the cells to general and the % and $ will go away.


Gord

On Tue, 23 Sep 2008 16:28:01 -0700, dk wrote:

no didn"t work
ex:(9-

44
^

46

47

50
51

52

921
54

56

66

-69

(4/

70



%
0

$/

83

94

44^

87 .


%


91

0
4%

94

41
95

96 ?
%

$4

"Gord Dibben" wrote:

Does this mean none of the code I gave you two days ago is of any use to
you?

Or does it mean you did not try it?


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 10:13:01 -0700, dk wrote:

Can you give us a clear idea for emptying non numeric charachters from cells
& keeping the numeric part of the cell and also for emptying the whole cell





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
Randomly populating empty cells with other text cells Throme88 Excel Discussion (Misc queries) 3 July 1st 08 02:58 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
When I SUM cells & 1 is empty I need the result to be empty not 0 Maribel Excel Discussion (Misc queries) 1 August 2nd 05 12:49 AM
How can I convert empty strings to empty cells? Shane Excel Discussion (Misc queries) 2 July 19th 05 12:10 PM
how do populate empty cells with the contents of populated cells . Jim99 Excel Discussion (Misc queries) 6 April 21st 05 05:44 PM


All times are GMT +1. The time now is 12:51 AM.

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"