Look at VBA's help for InStr. It's the VBA equivalent of Excel's =Find()/=Search().
On 11/24/2010 19:37, u473 wrote:
> Found = ""
> For Each cell In Rng
> 'The following formula works in Excel
> 'nFound = left(B6,if(iserror(Find(" 3.",B6)),0,Find(" 3.",B6)))
> '
> ' However, all my syntax variations to adapt it in VBA do not work.
> Can you help me
> '
> nFound = "=left(cell.value,if iserror(Find(' 3.',cell.value)),
> 0,Find(' 3.',cell.value))"
> If nFound<> Found Then
> 'Copy Row ........
> Found = nFound
> End If
> Next cell
> '
> Help appreciated.
--
Dave Peterson
|