View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
[email protected] EagleOne@discussions.microsoft.com is offline
external usenet poster
 
Posts: 391
Default How in to parse constants in formula to cells


Ron,

Here is what I came up with. Any thoughts for improvement appreciated.

For testing, the "formula" I used in "A1":
=687319+523187-7344000+758450+2232642+1995819-2721538+1491693+723564+(C1*3)

My results a
687319~523187~7344000~758450~2232642~1995819~27215 38~1491693~723564~3

Because I changed the operational signs to "~" I have lost positive vs negative numbers.

Can you think of a way to preserve the positive vs negative numbers?

EagleOne

Ron Rosenfeld wrote:

On Sat, 25 Nov 2006 16:11:13 GMT, wrote:

Appreciate your time & knowledge. I agree, the challenge is awesome.

EagleOne


If I were going to do that, I think I would first replace every character that
is a function parameter with a nonsense string, perhaps a tilde ~.

Then replace all the cell references and operators with tilde's.

Then extract the numbers that remain.

I would use regular expressions to do all that.
--ron