Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default convert binary to decimal

i have given the folloing command in one of the cell.

=BIN2DEC(1100100)

When I hit enter i am getting the following text.

#NAME?

Can anyone help me fix this problem.

Krishnakanth M
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default convert binary to decimal

Tools Addins... and check the Analysis Toolpak
--
Gary''s Student - gsnu2007h


"Krishnakanth" wrote:

i have given the folloing command in one of the cell.

=BIN2DEC(1100100)

When I hit enter i am getting the following text.

#NAME?

Can anyone help me fix this problem.

Krishnakanth M

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default convert binary to decimal

Here is a UDF that you can use.

Function BIN2DEC(data As Variant) As Variant

If Not IsNumeric(data) Then
data = Format(data, "text")
Else
data = Trim(data)
End If
BIN2DEC = 0
Do While data < ""
NewChar = Left(data, 1)
data = Mid(data, 2)
Select Case NewChar
Case "0"
BIN2DEC = 2 * BIN2DEC
Case "1"
BIN2DEC = (2 * BIN2DEC) + 1
Case Else
BIN2DEC = "Not Binary"
End Select
Loop

End Function


"Krishnakanth" wrote:

i have given the folloing command in one of the cell.

=BIN2DEC(1100100)

When I hit enter i am getting the following text.

#NAME?

Can anyone help me fix this problem.

Krishnakanth M

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
decimal to binary conversion tam Excel Worksheet Functions 9 November 30th 13 07:30 PM
Convert Binary to Decimal using IF and Sum Functions? YourFriendlyTechGuy Excel Worksheet Functions 3 January 31st 07 01:06 AM
decimal to binary boardmaker Excel Discussion (Misc queries) 4 June 13th 06 09:00 PM
How can I convert binary numbers to decimal when they are larger . Nebulae Excel Worksheet Functions 1 April 14th 05 05:50 PM
Decimal to Binary Himu Excel Worksheet Functions 15 November 22nd 04 07:13 PM


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