Hi all
I have Some data which looks like this:
<tbody>
</tbody>
Im using the following vba code which isnt quite getting the right answer:
But the vba code is finding the Onions in "Spring Onions" and returns row 9, i need it to match contents exactly and return row 3 in the example above.
Can anyone help on adjusting this?
Thank you
I have Some data which looks like this:
Row | Data |
1 | Onions |
2 | Onions |
3 | Onions |
4 | Potatoes |
5 | Potatoes |
6 | Potatoes |
7 | Spring Onions |
8 | Spring Onions |
9 | Spring Onions |
<tbody>
</tbody>
Im using the following vba code which isnt quite getting the right answer:
Code:
Set where = C.Find(what:="Onions", after:=C(1), searchdirection:=xlPrevious)
endrow = where.Row
But the vba code is finding the Onions in "Spring Onions" and returns row 9, i need it to match contents exactly and return row 3 in the example above.
Can anyone help on adjusting this?
Thank you