![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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. |
| Ads |
|
#2
|
|||
|
|||
|
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 |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Formula Help - Lookup, if, iserror?? | Ash | Excel Discussion (Misc queries) | 9 | November 7th 08 05:08 PM |
| Using iserror in formula | forest8 | Excel Discussion (Misc queries) | 1 | September 2nd 07 03:51 AM |
| Using ISERROR to Solve #DIV/0 in a formula | Leigh Douglass | Excel Worksheet Functions | 13 | August 23rd 07 06:12 PM |
| ISERROR Formula | Toyin | Excel Programming | 1 | November 16th 04 10:44 AM |
| IsError Formula | Steph[_3_] | Excel Programming | 1 | May 13th 04 08:21 PM |