excel vba - String comparison using Like an wildcard not working -


i have data in cells in column b id# plus number e.g 'id# 85'

all other cells have names in them firstname lastname

i need find cells have id# in them, trying following, not working

thanks

sub test() dim ws worksheet dim long    set ws = thisworkbook.sheets("elements")    ws   = 2 180     if .cells(i, "b").text "id#" & "*"   next end  end sub 

try this:

sub test()     dim ws worksheet     dim long     set ws = thisworkbook.sheets("elements")      ws         = 2 180             if left(.cells(i, "b").text, 3) = "id#"                 .cells(i, "c").value = true             end if         next     end end sub 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -