Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default Numerals conversion

Hi,
Does somebody have any idea about how to develop some VBA function or macro aiming conversion of several numerals types and that could be used for small and large numbers(e.g. 100000000000 in decimal)? The major numerals base for which I need this conversions a
Binary (Base 2)
Ternary (Base 3)
Quaternary (Base 4)
Quinary (Baase 5)
Senary (Base 6)
Septenary (Base 7)
Octal (Base 8)
Nonary (Base 9)
Decimal (Base 10)
Undecimal (Base 11)
Duodecimal (Base 12)
Base 13
Hexadecimal (Base 16)
Vigesimal (Base 20)

Thanks in advance,
Luciano
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default Numerals conversion

Hi there Luciano

Not sure if I am reading right or not.

Have a look at the following, it may point you in the right direction.

It assumes your numbers you want to convert are in Column "B", so
anytime you enter the base value you have presented the adjacent cell
will change its decimal count to the number entered.

I may have misinterpreted what it is you're needing, but someone else
may have another idea for you to run with.

HTH
Mick.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim r As Long

If Not Intersect(Target, Range("A1:A20")) Is Nothing Then

Select Case True

Case Target.Value = 2
With ActiveCell
.Offset(0, 1).NumberFormat = "0.00"
End With
Case Target.Value = 3
With ActiveCell
.Offset(0, 1).NumberFormat = "0.000"
End With
Case Target.Value = 4
With ActiveCell
.Offset(0, 1).NumberFormat = "0.0000"
End With
Case Target.Value = 5
With ActiveCell
.Offset(0, 1).NumberFormat = "0.00000"
End With
Case Target.Value = 6
With ActiveCell
.Offset(0, 1).NumberFormat = "0.000000"
End With
Case Target.Value = 7
With ActiveCell
.Offset(0, 1).NumberFormat = "0.0000000"
End With
Case Target.Value = 8
With ActiveCell
.Offset(0, 1).NumberFormat = "0.00000000"
End With
Case Target.Value = 9
With ActiveCell
.Offset(0, 1).NumberFormat = "0.000000000"
End With
Case Target.Value = 10
With ActiveCell
.Offset(0, 1).NumberFormat = "0.0000000000"
End With
Case Target.Value = 11
With ActiveCell
.Offset(0, 1).NumberFormat = "0.00000000000"
End With
Case Target.Value = 12
With ActiveCell
.Offset(0, 1).NumberFormat = "0.000000000000"
End With
Case Target.Value = 16
With ActiveCell
.Offset(0, 1).NumberFormat = "0.0000000000000000"
End With
Case Target.Value = 20
With ActiveCell
.Offset(0, 1).NumberFormat = "0.00000000000000000000"
End With
Case Else
r = MsgBox("You Need to enter a number between 2 & 20")

End Select
End If
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default Numerals conversion

Hey there Luciano

I do not respond to direct mail, unless invited.

The reason for this apart from Newsgroup Etiquette is that others whom
may have a similar need miss out.

I see you have a few responses to your other thread so will discontinue
this on.

Cheers
Mick.
Reply
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
Sub/superscript numerals in UNICODE PBezucha Excel Programming 2 April 20th 09 02:50 PM
Relating numerals as text BilyumQ Excel Discussion (Misc queries) 1 April 16th 07 04:40 AM
changing text to numerals JRD Excel Worksheet Functions 3 August 24th 06 04:54 PM
How do I display numerals (5) as words (five)? Wesley Poston Excel Discussion (Misc queries) 2 February 14th 06 09:31 PM
Numerals changing Crocketty Excel Discussion (Misc queries) 10 May 19th 05 03:30 AM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"