View Single Post
  #2   Report Post  
Dave O
 
Posts: n/a
Default

Your code is currently structured to find the first 2 or 3 in the
search area- when it looks for 2 or 3 the first one encountered happens
to be the 23 entry. You can solve this by taking these steps:
1. MAKE A BACKUP OF YOUR DATA so you don't inadvertenly lose critical
information, and so you can revert to your original (albeit somewhat
flawed) version.
2. Where your code says
LookIn:=xlFormulas, _
LookAt:=xlPart, _


.... replace these lines with
LookIn:=xlValues, _
LookAt:=xlWhole, _

This causes the search to look for just the value 2 or just the value 3
and will not find the value 23, for instance.

See if the solves the zero values with option 4 problem- I don't have
an idea for that one, but it may be something specific to your data
rather than the code.

Cheers!!