View Single Post
  #11   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 17 Jan 2005 04:59:22 GMT, Wildman wrote:

Well Ron......

You DA Man!

and I thank you for your help.

Do you have any VBA for base 32 to Decimal?
The formulas I wrote to do that seem quite
archaic compared to the VBA.

Thanks again
Wildman


Wildman,

Look closely at the code for my BaseConvert Routine:

Function BaseConvert(Num, FromBase As Integer, _
ToBase As Integer, Optional DecPlace As Long) _
As String

Num is the number you are converting

FromBase is the base from which you are converting (or the base of Num)

ToBase is the base to which you wish to convert.

DecPlace is an optional argument to use if you want a fractional part in the
result.

So you would just rewrite your worksheet function as:

=BaseConvert(A1, 32, 10)

Note that you could have the bases in cell references also, for flexibility:

A1: number to be converted
A2: Base of number in A1
A3: Base of result

=BaseConvert(A1, A2, A3)

and so forth.


--ron