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 solution without using VBA. Is it possible?
问题:
回答1:
I did this. Here you can download MD5 in pure Excel without VBA. Office 2013 ONLY.
https://tzamtzis.gr/2017/web-analytics/excel-function-md5-hashing-without-vba/ https://tzamtzis.gr/tzamtziswp/wp-content/uploads/2017/05/MD5.xlsx
Office 2013 comes with handy functions for bitwise operations like BITAND()
, BITOR()
, BITXOR()
, BITR[L]SHIFT()
. I think it's technically possible to implement MD5 in previous versions of Office, but it will be utter hell because you will have to convert values to binary, then convert this to strings, then do some character replacement mixed with arithmetical addition/subtraction etc. etc. Add to this 15-digit maximum number precision (which means you will have hard time even processing 16-bit binary values).
My workbook can process strings up to 1024 ASCII characters long. This is to reduce the file size (which is already 185 kb). If you need to process longer messages you can add calculation blocks to the bottom of the table (a single calculation block consists of 64 rows). But I think this is pretty much enough to demonstrate that MD5 in pure Excel isn't really a good idea.