LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default delete non numberic characters

I am trying to come up with a "Do until Loop" macro to find and remove
non-numeric characters from all cells in a column, leaving only the numbers.
For example, if cell b6 contains
"$6,800 - ", I would like the macro to delete the "-" so that the cell will
have a value of -6,800.

I need the macro to Loop until the last row. I've tried to come up with a
macro but have not been successful. So far i have come up with this but it
stops me at the "Find" in my formula.

Sub CalculateOA()
Dim i As Integer

i = 5
Do Until [last row, what is the formula?]

Cells(i, 11).Value = Left(Cells(i, 11), (Find(("-"), Cells(i, 11)) - 1))
* -1

i = i + 1
Loop


Please help
 
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
Delete first two characters in a cell... ChuckF Excel Worksheet Functions 6 September 5th 06 08:46 PM
Delete first few cell characters mohd21uk via OfficeKB.com Excel Discussion (Misc queries) 4 June 7th 06 12:32 PM
auto delete characters in cell left of @ sign Rusty Setting up and Configuration of Excel 9 January 23rd 06 06:14 PM
Delete A Word That Exceeds X Number Of Characters brazen234 Excel Worksheet Functions 3 December 31st 05 04:37 PM
set up a macro to delete characters in each cell of a column Rick Excel Discussion (Misc queries) 2 September 18th 05 03:02 AM


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