Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Randomly populating empty cells with other text cells | Excel Discussion (Misc queries) | |||
Excel - Autom. Filter "Empty / Non Empty cells" should come first | Excel Discussion (Misc queries) | |||
When I SUM cells & 1 is empty I need the result to be empty not 0 | Excel Discussion (Misc queries) | |||
How can I convert empty strings to empty cells? | Excel Discussion (Misc queries) | |||
how do populate empty cells with the contents of populated cells . | Excel Discussion (Misc queries) |