As I mentioned in post #6, I'd already tried renaming the function, once I'd identified it as a problem in 2007. But then I wasn't getting the #Ref! but a #Name!. I'm not sure I mentioned it, but I was importing it as a class module. Finally, what I did to put it all together and get it working for me was...
1) Download the file that kusk0r mentions in the first post of the thread.
2) Edit line 563 and 637 of the file CSHA256.CLS that is included in the ZIP so that the function SHA256 is renamed. I renamed it to SHADD256 for some reason. Save the file.
3) In Excel 2007, go to Developer Tab, Click on Visual Basic.
4) In the IDE, do File|Import File. Locate your CSHA256.CLS file and load it. It will load as a class module.
5) You will need something that actually makes it work, though, and that's the part that kusk0r posted. Right-click in the Project area of the Visual Basic IDE. Choose Insert|Module. It will create a module named Module1 which shows up in the tree. Open it. Paste kusk0r's code from his post earlier, but edit it to reflect the new, longer function that you've renamed so as to avoid Excel 2007+ thinking it's a cell reference. So, in my case, I made it:
Code:
Public Function SHADD256(sMessage As String)
Dim clsX As CSHA256
Set clsX = New CSHA256
SHADD256 = clsX.SHADD256(sMessage)
Set clsX = Nothing
End Function
That should do it. Now, for example, back on your spreadsheet use the function in cell A1
=SHADD256(B1) and in the cell B1, enter the text to be hashed. It all works!
I will not post my spreadsheet, as the original code is copyright Phil Fresle, and he hasn't any distribution licensing in there, but I'd be willing to help folks who need it.