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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -