I have a file with multiple sheets. Most of the sheets are named for states. I will import a worksheet monthly that has sales data that needs to be copied one line at a time and pasted to the correct company on the sheet that corresponds to the appropriate state. I want to do this by macro. Here is what my sheets look like...
Arkansas
A B
Comp1 $1000
Comp2 $2000
Louisiana
A B
Comp3 $500
Comp4 $1000
Sheet3 - Import
A B C
Comp1 AR $500
Comp3 LA $500
Comp2 AR $500
What I want is a macro that will read each line in Sheet3 and depending on the state in column B, copy/paste/special/add the value in column C to the amount in column B for the corresponding company on the sheet for that state. In other words I would like to see..
Arkansas
A B
Comp1 $1500
Comp2 $2500
Louisiana
A B
Comp3 $1000
Comp4 $1000
I am a pretty new at macros so I don't know how complicated this is. I don't really know where to start. I tried recording the macro but because of the lookups across several sheets, I am not having any luck. Can anyone at least show me some code for doing lookups while looping through the import data?
Arkansas
A B
Comp1 $1000
Comp2 $2000
Louisiana
A B
Comp3 $500
Comp4 $1000
Sheet3 - Import
A B C
Comp1 AR $500
Comp3 LA $500
Comp2 AR $500
What I want is a macro that will read each line in Sheet3 and depending on the state in column B, copy/paste/special/add the value in column C to the amount in column B for the corresponding company on the sheet for that state. In other words I would like to see..
Arkansas
A B
Comp1 $1500
Comp2 $2500
Louisiana
A B
Comp3 $1000
Comp4 $1000
I am a pretty new at macros so I don't know how complicated this is. I don't really know where to start. I tried recording the macro but because of the lookups across several sheets, I am not having any luck. Can anyone at least show me some code for doing lookups while looping through the import data?