excel - Find a Row that contains a partial text value, return the row number -
i trying write simple vba function return first row range on separate sheet contains text value, may not exact 1 1 match. example: 'farm' found in 'farm123'
my attempt was:
public function locit(whatcell range) range set locit = sheets(sheet4).columns("c").find(what:="*" & whatcell.value & "*", lookat:=xlpart) end function
needless say, failed , has been years since have attempted type of code. can set me on right track?
here updated variant
public function locit(whatcell range) locit = sheets("sheet4").[c:c].find(whatcell.value).row end function
but better variant, guess:
public function locit(whatcell range, whatrange range) locit = whatrange.find(whatcell.value).row end function
output
Comments
Post a Comment