Look up Find in Excel VBA help, that shows how to find a value in the
column.
Then just offset the found cell by 1 column, cell.Offset(0,1).Value to get
B's value.
Don't understand the C bit.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Jani" wrote in message
oups.com...
I'm a VB programmer and now I was asked to do a simple task in Excel
using VBA. And I only have 2 days to do it. Can someone tell me how
to:
Search a given range in SheetA, look for ItemA (from column A) and
insert the data from SheetA's column B into SheetB's column B?
Additonal criteria would be, SheetA's column C should match the
filtering criteria obtain from SheetB's cell C1 and SheetA's ItemA
should match SheetB's column B, for example.
SheetA
ColA ColB ColC
A001 1000 2
A002 1200 2
A003 900 1
A004 1300 2
SheetB should shows (provided cell C1 = 2):
ColA ColB
A001 1000
A002 1200
A004 1300
I'm really in a rush for this task because this task is the 1st stage
in order to proceed to my later stages in my VB project development.