View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default how do i separate numbers and text in a cell?

The macro may not work for you, but I know that the technique that I suggested
will fail. It would work on the data that you originally posted, but not on
some of the data in your subsequent post.

It probably would have been quicker (for you and Biff!) for you to have posted a
representative sample of data--like you did later.

This surely doesn't help this time <bg, but maybe it'll help the next time
(either you or someone lurking before asking a question).

Jan wrote:

hi, i tried the macro however all numbers are printed, i would go for such a
solution as T Valko created as this can be placed in a separate column which
gives great performance. the macro has less performance, i have to check
about 30.000 rows.

thanks

"Dave Peterson" wrote:

This worked for me since there were only a pair of ()'s (and those ()'s had to
be there).

I copied the column to the next column (inserting that extra column first).

I selected the column that will hold the text.
Edit|Replace
what: _(* I used _ to represent the space character)
with: (leave blank)
replace all

Then I selected the column that would hold the numbers.
Edit|Replace
what: *(
with: (leave blank)
replace all

and one more

Edit|replace
what: _*)*
with: (leave blank)
replace all




Jan wrote:

i have the following text string
"Home: installation on Cognos (5.5 hrs)" the number represents the number of
hours i want to have separated from the text" difficulty is the fact this can
be displayed as 5.5hr, or 5.5 uur. secondly this doesn't necessary is 3
positions. could also be 5 uur. the only common part is that the data is
ALWAYS at the right hand site of the text string


--

Dave Peterson


--

Dave Peterson