View Single Post
  #1   Report Post  
KelleyS
 
Posts: n/a
Default Ignore Non-Alphanumerics When Comparing Text

I am comparing the values in two cells using a macro. The data I'm comparing
is coming from two different sources. These sources may have slightly
different values in the corresponding cells, particularly the inclusion or
absence of non-alpha characters.

For instance, one cell might have "ABC, Inc." while another has "ABC, Inc"
(no period after Inc). The period is not material for my purposes, so I'd
like the values to still pass the compare test as equal. Similarly, I'd like
to ignore commas and hyphens for the comparison. Is there a way to do this?