View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Convert a number upto 100 to binary

Look at the function dec2bin in the VBA help.

RBS

"Mark Dullingham" wrote in
message ...
Has anybody got a piece of code that can convert a nuber in a cell, say A1
and display it as a 7 digit binary number in B1?
I have tried to do this working from the 7th digit backwards using
combinations of 'if' and 'and' functions, but by the time I get to the 5/4
digits I am losing the will to live!

Many thanks in advance