excel - Compare two cells with the same word variant -


Can anyone help me with an Excel formula, whether a cell with a string of text same

P> cell A2: orange grapes apple

if I have A1 is the same or not to A2

thanks

attached Place the module in a module and call it a worksheet as a function, such as = sCompare (A1, A2)

code < / P>

  public function sCompare (S1 as string, S2 as string) Boolean dim vArr1, vArr2, lLoop long, in the form of lLoop2 long, bMatch boolean vArr1 = the form of split As in (trim (S1), "") vArr2 = split (trim (s2), "") if Ubound (vArr1) & lt; & Gt; For UBound (vArr2) lLoop again to exit function = 0 to UBound (vArr1) bMatch = false to lLoop2 = 0 to UBound (vArr2) then vArr1 (lLoop) = vArr2 (lLoop2) then bMatch = end Then the next lLoop2 then true exit for bMatch = false then exit the function next lLoop sCompare = True End Function    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -