Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MD5 Hash function in excel without using VBA

I need a function that will take an entire cell value in Excel and convert the value into its MD5 hash equivalent in a new cell.

Is there a formula in excel that does that? I need a solution that doesn't use VBA. Is this possible?

like image 558
user2002935 Avatar asked Nov 30 '25 02:11

user2002935


2 Answers

This was actually answered (with a "Yes", it's possible, and here's the proof) but the answer has been mysteriously removed. Fortunately, the Wayback Machine remembers the answer. Basically, by using Excel's bitwise operations (BITAND(), BITOR(), BITXOR(), BITR[L]SHIFT()), an MD5 calculation can be made.

Somebody even wrote a blog post on it, including an example workbook.

like image 199
JKVeganAbroad Avatar answered Dec 04 '25 20:12

JKVeganAbroad


Without VBA is possible to use webservice formula that invoke a webservice that return the md5sum.

Explanation

  • =WEBSERVICE(B4)

    • Result: 89374b6dda3bb0e16132b21fb9887f1d
  • =CONCAT("https://md5sum.herokuapp.com/?text=";ENCODEURL(B3))

    • Result: https://md5sum.herokuapp.com/?text=bruno%20tafarelo
  • B3 cells contains the text to be coded

    • Value: bruno tafarelo

spreadsheet sample

This web service was developed by me as all the services on internet require a POST method and Excel is only able to perform GET request. It's hosted in a free service and I don't know for how long it will be available.

Web service source code: https://github.com/btafarelo/md5sum

like image 29
btafarelo Avatar answered Dec 04 '25 21:12

btafarelo