Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Help - Lookup, if, iserror?? | Excel Discussion (Misc queries) | |||
Using iserror in formula | Excel Discussion (Misc queries) | |||
Using ISERROR to Solve #DIV/0 in a formula | Excel Worksheet Functions | |||
ISERROR Formula | Excel Programming | |||
IsError Formula | Excel Programming |