Need help putting together merging code for the following scenario holding a Code 1 in the top row and a Code 2 in the bottom row of Col A.
A..........B..........C.........D...........E...............F............G............H.............I..............
Code...NSN#.....Desc.....Other1.....Other2.....SRAN.........Other3....Loc.........City............
===================================================================
1........4545.....Bolt......[.........]....shelf 95...FB22..........xx299......Calf.....[................]..
2........4545.....Bolt.......0.25mm....shelf 15...FB22..........xx299.......NYC....[................]..
x........4545......xxx.......xxxxxxx.....xxxxxx....NO SRAN....xxxxxx......xxxx......Los Angeles...
Had trouble trying to get an image to show up using the <img> and tags so, resorting to the old-fashioned visual.
<u>Here's the set of rules I must use to merge the data from the BOTTOM ROW into the TOP ROW.</u>
<b><u>SCENARIO # 1:</b></u>
<b>DO THE NSNs MATCH? </b>
<b>YES,</b> use the bottom row to update the top row.
Begin updating/merging data with COLUMN D,
Continue merge comparisons for the following columns: E,I,J,K,L,M,N,O,P,Q,S,T,U,V,W,X,Y,Z,AA,AB, and so on thru AQ.
....If data in top row is blank THEN populate top row from the bottom row.********
....If data in top row is populated but different THEN populate top row from the bottom row.*****
....If data in top row is populated and the same THEN populate top row from the bottom row.*****
....If data in both the top and bottom rows are blank, look to see if a "NO SRAN" row exists and use THAT row to populate top row.
Turn the newly merged top row orange.
Change all font to black.
Place a "C" to the right of the code that exists in Column A. Example, Code 1 will become "1C" or if Code 2, it will become "2C".
(this indicates the data was updated/changed and is acceptable for use.
<b>Move to the next available row and re-start comparison process from beginning .</b>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<b>If a "NO SRAN" row does NOT exist,</b> select the bottom row, cut and paste this bottom row onto another sheet called "Archive".
Turn the newly merged top row orange.
Change all font to black.
Place a "C" to the right of the code that exists in Column A. Example, Code 1 will become "1C" or if Code 2, it will become "2C".
(this indicates the data was updated/changed and is acceptable for use.
Move to the next available row and re-start comparison process from beginning .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<i><b>Notice how the blank areas on the top row will be populated using the bottom row (if available)</i></b>
<i><b>If both the top row AND bottom row are blank, the code will attempt to locate a "NO SRAN" row and use THAT row's data to populate the top row.</i></b>
(Los Angeles) in this case would be copied up into the top row to ensure it was all inclusive of as much data as possible.
(0.25 mm) in Column D would get copied up into the top row since it was available for merging.
A..........B..........C.........D...........E...............F............G............H.............I..............
Code...NSN#.....Desc.....Other1.....Other2.....SRAN.........Other3....Loc.........City............
===================================================================
1........4545.....Bolt......[.........]....shelf 95...FB22..........xx299......Calf.....[................]..
2........4545.....Bolt.......0.25mm....shelf 15...FB22..........xx299.......NYC....[................]..
x........4545......xxx.......xxxxxxx.....xxxxxx....NO SRAN....xxxxxx......xxxx......Los Angeles...
Had trouble trying to get an image to show up using the <img> and tags so, resorting to the old-fashioned visual.
<u>Here's the set of rules I must use to merge the data from the BOTTOM ROW into the TOP ROW.</u>
<b><u>SCENARIO # 1:</b></u>
<b>DO THE NSNs MATCH? </b>
<b>YES,</b> use the bottom row to update the top row.
Begin updating/merging data with COLUMN D,
Continue merge comparisons for the following columns: E,I,J,K,L,M,N,O,P,Q,S,T,U,V,W,X,Y,Z,AA,AB, and so on thru AQ.
....If data in top row is blank THEN populate top row from the bottom row.********
....If data in top row is populated but different THEN populate top row from the bottom row.*****
....If data in top row is populated and the same THEN populate top row from the bottom row.*****
....If data in both the top and bottom rows are blank, look to see if a "NO SRAN" row exists and use THAT row to populate top row.
Turn the newly merged top row orange.
Change all font to black.
Place a "C" to the right of the code that exists in Column A. Example, Code 1 will become "1C" or if Code 2, it will become "2C".
(this indicates the data was updated/changed and is acceptable for use.
<b>Move to the next available row and re-start comparison process from beginning .</b>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<b>If a "NO SRAN" row does NOT exist,</b> select the bottom row, cut and paste this bottom row onto another sheet called "Archive".
Turn the newly merged top row orange.
Change all font to black.
Place a "C" to the right of the code that exists in Column A. Example, Code 1 will become "1C" or if Code 2, it will become "2C".
(this indicates the data was updated/changed and is acceptable for use.
Move to the next available row and re-start comparison process from beginning .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<i><b>Notice how the blank areas on the top row will be populated using the bottom row (if available)</i></b>
<i><b>If both the top row AND bottom row are blank, the code will attempt to locate a "NO SRAN" row and use THAT row's data to populate the top row.</i></b>
(Los Angeles) in this case would be copied up into the top row to ensure it was all inclusive of as much data as possible.
(0.25 mm) in Column D would get copied up into the top row since it was available for merging.