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
Post a Comment