LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #22   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tom Ogilvy - Need a little change

Is this the correct way or is there a better way?
Looks as good as any.

sArr is a string

v5A would need to stay variant. It would still allow you to have doubles or
singles. I don't see any reason to use currency.

I would expect the numbers in v5a are doubles already

just to demonstrate:

Sub BB()
sArr = "{4,10;5,30;" & _
"6,120;7,1000;" & _
"8,11000;9,80000;" & _
"10,2000000}"
v = Evaluate(sArr)
Debug.Print TypeName(v(1, 1)), TypeName(v(1, 2))

End Sub

produces:

Double Double

numbers in cells are stored as double and evaluate is essentially a virtual
cell.

--
Regards,
Tom Ogilvy


"Maxi" wrote in message
oups.com...
Thats great

There would be one more change required then.

The following is only applicable for a combination of 10 numbers. For
6, it would be different.
sArr = "{4,10;5,30;" & _
"6,120;7,1000;" & _
"8,11000;9,80000;" & _
"10,2000000}"
v5a = Evaluate(sArr)

Can I define something like:

sArr2 = "{xxxxxxxxxxxxxxxx}"
sArr3 = "{xxxxxxxxxxxxxxxx}"
sArr4 = "{xxxxxxxxxxxxxxxx}"
sArr5 = "{xxxxxxxxxxxxxxxx}"
sArr6 = "{xxxxxxxxxxxxxxxx}"
sArr7 = "{xxxxxxxxxxxxxxxx}"
sArr8 = "{xxxxxxxxxxxxxxxx}"
sArr9 = "{xxxxxxxxxxxxxxxx}"
sArr10 = "{xxxxxxxxxxxxxxxx}"
v5a = Evaluate(sArr & iComb)

Is this the correct way or is there a better way?

One more question, currently the SArr values are whole numbers
(10,30,120,1000,11000,80000,2000000). If these values have decimals
like (10.25,30.5,120.75,1000,11000,80000,2000000) then I feel just
changing Dim v3a() As Long to Dim v3a() As Currency would do the job. I
read this in excel help files. Is this correct?

Thanks
Maxi



 
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
Tom Ogilvy Denny Crane Excel Worksheet Functions 2 March 15th 06 08:41 PM
Tom Ogilvy - More help please Tempy Excel Programming 4 May 20th 05 07:20 AM
To Tom Ogilvy J_J[_2_] Excel Programming 2 March 21st 05 04:14 PM
Thank You Tom Ogilvy Brian Excel Worksheet Functions 0 December 16th 04 02:47 AM
Tom Ogilvy David Joseph Excel Programming 0 April 21st 04 02:57 PM


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