I'm trying a conditional look up, I have worksheet A which lists stock trades
Worksheet A
Stock Date Price Quantity Cost
X 1/12/10 5 2 10
Y 1/1/11 2 2 4
Z 13/1/11 3 3 9
Z 17/1/11 2 4 8
on another worksheet B I have defined sectors for each of these 3 companies (X, Y & Z)
Worksheet B
X - Commodities
Y - Finance
Z - Industrial
what I want is a macro to look up on worksheet A all trades in January and copy the finance trades (looked up on worksheet B) on a worksheet called "finance", and industrial on the "industrial" worksheet.
so worksheet finance will look like
Y 1/1/11 2 2 4
and worksheet industrial will look like
Z 13/1/11 3 3 9
Z 17/1/11 2 4 8
If someone can point me in the right direction for a VBA Macro to do this, I would be grateful.
Worksheet A
Stock Date Price Quantity Cost
X 1/12/10 5 2 10
Y 1/1/11 2 2 4
Z 13/1/11 3 3 9
Z 17/1/11 2 4 8
on another worksheet B I have defined sectors for each of these 3 companies (X, Y & Z)
Worksheet B
X - Commodities
Y - Finance
Z - Industrial
what I want is a macro to look up on worksheet A all trades in January and copy the finance trades (looked up on worksheet B) on a worksheet called "finance", and industrial on the "industrial" worksheet.
so worksheet finance will look like
Y 1/1/11 2 2 4
and worksheet industrial will look like
Z 13/1/11 3 3 9
Z 17/1/11 2 4 8
If someone can point me in the right direction for a VBA Macro to do this, I would be grateful.