Add Regex support in Excel module

1. In an Excel workbook, press Alt+F11 to open VBA/Macros window.
2. Add reference to regex under Tools > References and selecting Microsoft VBScript Regular Expression 5.5
3. Then add module by Insert > Module
4. Paste the following code in the editor window that appears and close the VBA/Macros window.

Rem Source: https://www.oreilly.com/library/view/vbscript-in-a/1565927206/re155.html
Rem Source: Point 7 on https://stackoverflow.com/a/43128681
Function Regex(text As Range, ByVal pattern As String, Optional ByVal replaceWith As String, _
        Optional ignore_case As Boolean = True, Optional global_search As Boolean = False, _
        Optional multi_line As Boolean = False)
    Dim re   As RegExp
    Set re = New RegExp
    
    With re
        .IgnoreCase = ignore_case  'ignoring cases while regex engine performs the search.
        .pattern = pattern  'declaring regex pattern.
        .Global = global_search     'restricting regex to find only first match.
        .MultiLine = multi_line
        
        If .test(text.Value) Then         'Testing if the pattern matches or not
            If (Len(replaceWith) = 0) Then
                Regex = .Execute(text.Value)(0)
            Else
                Regex = .Replace(text.Value, replaceWith)
            End If
        Else
            Regex = ""
        End If
    End With
End Function

Add SHA1 Module to Excel

Rem Function source: https://stackoverflow.com/a/52276018
Function SHA(MyRange As Range)
    Dim aBytes: aBytes = MyRange.Value
    Dim oBytes: oBytes = CreateObject("System.Text.UTF8Encoding").GetBytes_4(aBytes)

    Dim oSHA1: Set oSHA1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
    oBytes = oSHA1.ComputeHash_2((oBytes))
    
    Dim hexStr, x
    For x = 1 To LenB(oBytes)
        hexStr = LCase(Hex(AscB(MidB((oBytes), x, 1))))
        If Len(hexStr) = 1 Then hexStr = "0" & hexStr
        SHA = SHA & hexStr
    Next
End Function

Calculate MD5/SHA1/SHA256 and other checksums in VBScript

rem Function source: https://stackoverflow.com/a/52276018
Function bytesToHex(aBytes)
    Dim hexStr, x
    For x=1 To lenb(aBytes)
        hexStr= LCase(hex(ascb(midb( (aBytes) ,x,1))))
        if len(hexStr)=1 then hexStr="0" & hexStr
        bytesToHex=bytesToHex & hexStr
    Next
end Function

Dim oBytes : oBytes = CreateObject("System.Text.UTF8Encoding").GetBytes_4("Hello world")

Dim oSHA1 : set oSHA1 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
oBytes = oSHA1.ComputeHash_2((oBytes))

rem Wscript.Echo TypeName(oBytes)

Wscript.Echo bytesToHex(oBytes)