+ Reply to Thread
Results 1 to 6 of 6

Reverse Data In A Cell / Reverse Cell Contents

  1. #1
    Registered User
    Join Date
    12-18-2009
    Location
    Here
    MS-Off Ver
    Excel 2007
    Posts
    3

    Reverse Data In A Cell / Reverse Cell Contents

    Hi -

    I am trying to write a formula to reverse data in a cell.

    Basically I am converting a number to hex then I want to take that hex string and reverse it.

    So it would be something like this my original number is 400001001 my hex number would be 17D787E9 because I am only allowing it to show 8 characters. I want to reverse the 17D787E9 to read 9E787D71.

    My question is:

    How can I reverse that cell?
    I have searched google and this forum and can't seem to figure it out.

    I am sure I could do it in VB but I don't know any VB code.

    Thanks for your help!
    Last edited by nostawydoc; 12-18-2009 at 05:20 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Formula Help

    Please, rename your title according to the rules so we can help you. Ty

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Reverse Data In A Cell / Reverse Cell Contents

    With
    A1 containing a numeric value...eg 400001001

    Try this:

    Create a Custom Function in VBA:
    •Alt+F11.....to open the VBA Editor
    •Right-Click on the workbook name in the Project window
    •••Insert.Module

    In that new module, paste the following code:

    Please Login or Register  to view this content.
    Back on your worksheet:
    Please Login or Register  to view this content.

    In the above example, the formula returns: 9E787D71

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    12-18-2009
    Location
    Here
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reverse Data In A Cell / Reverse Cell Contents

    Thanks so much for your help. This is exactly what I needed.

    One last thing. Is there a way to protect workbook/sheet to keep folks from accessing the code in this windows?

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Reverse Data In A Cell / Reverse Cell Contents

    To protect the VBA code....
    In the VBA Editor:
    Tools.VBAProject_Properties.Protection tab...set the visibility and password

    If you want to password protect the workbook or worksheet...
    From the ribbon:
    Home.Format.Protect_Sheet...adjust the settings.

    If you use a password...make sure you won't forget it or lose it.

  6. #6
    Registered User
    Join Date
    12-18-2009
    Location
    Here
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reverse Data In A Cell / Reverse Cell Contents

    Thanks for all your help.

    My problem is solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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