I have
DownLoad Worksheet that contains the following
B C d e F G H I J K L M N
1 ELEM Plant Accum 2006-03 2006-04 2006-05 2006-06 2006-07 2006-08 2006-09 2006-10 2006-11 2006-12
2 --------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
3 1 2222 5467 5555 5467 23343 45345 34324 345345 3434 4534 344534 435345
4 32 5654 435345 3434 4343 3434 45435 45435 4545 45345 454 435 4545
The records continue to about 2,000
I have a second Element sheet that contains the following
A B C D E F G H I J K
5 2005-01 2005-02 2005-03 etc for each month thru
6Warren S 2452 ND,DR 1 2006-12
7Toledo II P 2460 TJ 3
8Toledo North W 2462 4
9JNAP C 4012 WK 32
10Belvidere D 4015 8
SHAP N 4025 JR 6
etc
I would like to compare starting at e1 in Download worksheet to see if there is a match to any column in Element worksheet on row 5 beginning in column I and ending in column AF. If there is a match then copy the values from DownLoad worksheet into the column that matches in the Element worksheet
IE there is a match on DownLoad worksheet 2006-03 and Element worksheet 2006-03 copy the values from download as shown above 5555, 3434 into Element worksheet under 2006-03
This would like like the following
A B C D E F G H I J K .. etc W
5 2005-01 2005-02 2005-03 2006-03
6 ren S 2452 ND,DR 1 5555
7Toledo II P 2460 TJ 3 3434
8Toledo North W 2462 4
9JNAP C 4012 WK 32
10Belvidere D 4015 8
SHAP N 4025 JR 6
etc
I need to loop through the Download columns beginning at e1 thru y1 and compare (the first row only) and compare starting at I5 until there is no longer a match.
LOOP LOGIC
Does E1 from DownLoad match I thru AF on Element worksheet . Yes then copy the volumes from download into the element worksheet. Next does f1 from DownLoad match I thru AF on Element worksheet Yes then copy volumes to Element worksheet Next does g1 from DownLoad match I thru AF on Element worksheet NO exit the loop
Start Free Trial