Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

Need a routine to find value in Access table and post value on sheet in appropriate cell

Excel 2003
Access 2003
"C:\DATA\MyGreen.mdb"
Table called "tblGreen"
2 fields
1- tblSku - text -100
2. tblGreenSku - text -100


"C:\DATA\Green.xls"
I have a sheet "tblFinal"
Headers in Row 1 always
Column A could at anytime contain any number of rows

ColumnA   ColumnB          ColumnC
Sku           comments       Green Sku
1A123       YES
2ER45       YES
6TY78        MAYBE
4R5T6       COULD BE

WHAT I NEED:

I need a sub routine to :
Take each  Value in ColumnA
See if it exists in  table "tblGreen"
in field tblSku - text -100
if it does  post the value in
"tblGreenSku" in ColumnC

If not fille the cell with "No Green"


EXAMPLE DATA IN :
tblGreen"
tblSku   tblGreenSku
1A123  2AW34
2ER45  4RE56
4R5T6  4RT51
etc....



RESULT:
ColumnA   ColumnB          ColumnC
Sku           comments        Green Sku
1A123       YES                  2AW34
2ER45       YES                  4RE56
6TY78        MAYBE             NO GREEN
4R5T6       COULD BE        4RT51


Thanks
fordraiders

ASKER CERTIFIED SOLUTION
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

Beautiful !
WORKED LIKE A CHARM !

Thanks so much !