# Thread: FIND AND INSERT SI NO (2000 sr 1)

1. ## FIND AND INSERT SI NO (2000 sr 1)

This file contain a wbook with 2 sheet.

My problem is to find, during the import file REGIONE.EPF in the module1, from the column H of the sheet REGIONE_GOT in the sheet REGIONE_DISK column A, and if the value is not finded insert "NO" in the column M of the sheet REGIONE_DISK , if the value is finded insert "SI" in the column M of the sheet REGIONE_DISK...

I have inserted in the column M of REGIONE_DISK a simple vlookup and the value not finded are colorized in RED

2. ## Re: FIND AND INSERT SI NO (2000 sr 1)

Hi Sal,

=IF(ISERROR(VLOOKUP(A3,REGIONE_GOT!\$H\$3:\$H\$304,1,0 )),"NO","SI")
then copy down as far as you need.

Cheers

3. ## Re: FIND AND INSERT SI NO (2000 sr 1)

ok! tks ...
I know this metod, but for me is important in VBA and during the import file...
If you have an idea...

4. ## Re: FIND AND INSERT SI NO (2000 sr 1)

You can place macropod's formula in the cells using VB. You could use something like this to add the formula:

With Worksheets("REGIONE_DISK")
.Range(.Range("A65536").End(xlUp).Offset(0, 12), _
.Range("m3")).FormulaR1C1 = _
"=IF(ISERROR(VLOOKUP(RC[-12],REGIONE_GOT!R3C8:R304C8,1,0)),""NO"",""SI"")"
End With

Or if you are looking for something else, could you be more specific about what you are trying to do and when in code you want to do it?
Steve

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•