+ Reply to Thread
Results 1 to 3 of 3

VBA convert decimal to hexadecimal numbers

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    159

    VBA convert decimal to hexadecimal numbers

    Hi all

    I need to convert a list of numbers from Decimal to combination of decimal and hexadecimal.
    Namely, the whole number I need to convert from Decimal to Hexadecimal. The decimal part of the number I will merged with the Hexadecimal.

    E.g.: Number 29.7764031619 will be split to 2 parts
    a) The whole number, which is 29. The whole part will be converted to Hexadecimal, and from 29 will become 1D.
    b) The decimal part, which is .7764031619
    After that, we'll merged the values in parts a) and b), and we'll get 1D.7764031619

    The formula example for this transformation can be found in the attached file in cells (D5:D11).

    I need to create code, which will automatically convert the values in a range from Decimal to the format shown above.

    I've started writing a code to make this changes in range (B19:B25), but I have problem with incorporating the decimal part.

    Thank you for your help with it.

    Igor

    Please Login or Register  to view this content.
    Dec 2 Hex.xlsbEnd Sub

  2. #2
    Registered User
    Join Date
    07-28-2015
    Location
    Pruszków, Poland
    MS-Off Ver
    365 Business
    Posts
    58

    Re: VBA convert decimal to hexadecimal numbers

    Hello, try this code:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: VBA convert decimal to hexadecimal numbers

    thank you Patronius.
    It works perfectly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using a "Do Until" loop to convert decimal numbers to hexadecimal
    By georgiapeach in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2014, 03:41 PM
  2. Replies: 2
    Last Post: 04-21-2010, 04:41 PM
  3. [SOLVED] I want to convert a column of hexadecimal numbers to decimal num
    By xs2sandeep in forum Excel General
    Replies: 2
    Last Post: 04-04-2006, 04:50 AM
  4. how to convert decimal numbers to words
    By Akbar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2006, 05:45 AM
  5. How can I convert binary numbers to decimal when they are larger .
    By Nebulae in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2005, 01:06 PM
  6. [SOLVED] How do I sum hours in Excel and convert to decimal numbers?
    By Heinsohn in forum Excel General
    Replies: 2
    Last Post: 03-05-2005, 04:06 PM
  7. [SOLVED] CONVERT HEXADECIMAL CELL TO DECIMAL NUMBER
    By JAY in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-24-2005, 11:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1