PDA

View Full Version : FIND AND INSERT SI NO



sal21
09-08-2004, 04:00 AM
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

Jacob Hilderbrand
09-08-2004, 04:05 AM
For M3:

=IF(ISNA(VLOOKUP(A3,REGIONE_GOT!$H$3:$H$304,1,0)),"No","SI")

Then fill down.

sal21
09-08-2004, 04:07 AM
For M3:

=IF(ISNA(VLOOKUP(A3,REGIONE_GOT!$H$3:$H$304,1,0)),"No","SI")

Then fill down.
Tks Jacob , yes i know this metod but my problem is to insert the value during the import and in VBA...

Jacob Hilderbrand
10-09-2004, 04:49 AM
You can put the formula in as you import the data:

Range("M3").Value = "=IF(ISNA(VLOOKUP(A3,REGIONE_GOT!$H$3:$H$304,1,0)), "No","SI")"

You can use variables for the rows as well.