excel - VBA Matching Issues -


the following code used matching between 2 sheets. work fine, have problem when

for example in sheet 1: (notes: use contents sheet 1 matching in sheet 2)

cells(1, 8) value: rev#  cells(1, 3) value: rev# 

in sheet 2:

value rev#: 123xyz  value rev#: pqrsabc 

rev# , rev# totally different thing, result program "123xyz". have idea correct result instead of rename rev# other?

thanks advise.

icol = 1  icol = 1 numofcol     findstring = worksheets("temp_a").cells(1, icol).value     set rng = activesheet.range(cells(1, 1), cells(numofrow1, numofcol1)).find(what:=findstring, lookin:=xlvalues, lookat:=xlwhole)      if rng.value = "process type:"         if instr(rng.offset(-1, 0).resize(1, 1).value, ":") > 0             temp = vbnullstring         else             temp = rng.offset(-1, 0).resize(1, 1).value         end if     else         if instr(rng.offset(1, 0).resize(1, 1).value, ":") > 0             temp = vbnullstring         else             temp = rng.offset(1, 0).resize(1, 1).value         end if     end if 


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -