0

I am looking for a HASH or maybe something even simpler.

I want to return a unique number for every string in a cell.

Does anyone know if there is a function in a cell that will return a unique number or a unique string for another string?

The problem is I would like to compare whether two string are totally equal, I need to be case sensitive.

Copas
  • 5,921
  • 5
  • 29
  • 43
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062

2 Answers2

-1

If you're in C# then can't you just use the standard GetHash function when you have a string variable that contains the contents of the cell?

Otherwise the following stack overflow question seems to already answer this question: Password hash function for Excel VBA

Community
  • 1
  • 1
Enigmativity
  • 113,464
  • 11
  • 89
  • 172
-1

to compare 2 strings in a case sensitive way ignoring the Option Compare setting use StrComp
IF StrComp(Str1,Str2,vbBinaryCompare)=0 then

Charles Williams
  • 23,121
  • 5
  • 38
  • 38