MIND BLOWING - Merging 2 rows into ONE shouldn't be THIS HARD....

ChrisOK

Well-known Member
Joined
Mar 26, 2003
Messages
601
I have 5 Scenarios that include IF/THEN rules with the ultimate goal of merging 2 rows of data. In a nutshell, the code should start at the top (row 3) and attempt to merge the row beneath it -- into it (IF it's a match)-- to ensure the top row has the MOST UP-TO-DATE content. Once it is done merging data FROM the source (row 4), that source (row 4) is removed leaving only the most up-to-date content row.

The code then moves down one row and loops.

If it were a single set of rules, it'd be a breeze, but since I was given 5 sets of rules, I'm stumped on how to put in a rotational rule set.
In other words: IF "THIS" row meets "THIS" criteria, use "THIS" set of rules to merge, if not, attempt to use the next set of rules, (until the appropriate set is located).

This will probably blow many minds - but I know there's some real vba geniuses out there that may think this challenge is a breeze...
Hopefully together - we can find a way to make this 'not so mind-blowing'... In advance, THANKS SO MUCH for ideas to overcome the stump!

I'm uploading images with the scenarios and rules for each..hoping the uploads provide clarity!
(Only allowed to upload 4 images, so the 5th may be done subsequently...)

<b>SCENARIO 1:</b>
http://www2.snapfish.com/snapfish/s...otsc=SHR/otsi=SPIClink/COBRAND_NAME=snapfish/

<b>SCENARIO 2:</b>
http://www2.snapfish.com/snapfish/s...otsc=SHR/otsi=SPIClink/COBRAND_NAME=snapfish/

<b>SCENARIO 3:</b>
http://www2.snapfish.com/snapfish/s...otsc=SHR/otsi=SPIClink/COBRAND_NAME=snapfish/


<b>SCENARIO 4:</b>
http://www2.snapfish.com/snapfish/s...otsc=SHR/otsi=SPIClink/COBRAND_NAME=snapfish/


<b>SCENARIO 5:</b>
http://www2.snapfish.com/snapfish/s...otsc=SHR/otsi=SPIClink/COBRAND_NAME=snapfish/
probably the easiest of all 5 sets of rules -- but can only post 4 images, so, I'll try to post it in a 2nd post:

Here's the rules for Scenario 5:

Rules if Code 2 only ---- Green Loaner Row with another Code 2 beneath it

1 Start with A3, Is A3 = 1? "NO", ------ (this will imply it is a "2")

2 Proceed to A4, Is A4 = to 1? "NO", (Code 2 loaners only have 1 option) Proceed…

3 IF NO, locate the next available "NO SRAN" row (looking within Column N). (row 9 in this case since COL N has the words "NO SRAN")

4 IF the "NO SRAN" NSN is a match to the Code 2 NSN row you are working, --- use the "NO SRAN" row to copy data to Row 3 startin at Column D as follows:

5 Copy whatever data is in D9 into D3 to correct the mis-match.

6 Continue on (comparing and updating row 3 as needed) until you reach Col AQ.
NOTE: During that movement from column to column, SKIP these four columns F, G, H and R.

7 Row 3 is now updated appropriately, therefore, TURN the updated row (3) in this case, to orange, change the font to black.

8 Check Col "H" for this row to see if data exists, if YES, place an "X" into Col Q

9 Check Col "I" for this row to see if data exists, if YES, place an "X" into Col Q

10 Check Col "G" for this row, if it is blank then copy "SRAN" data from Column N into Column G. (If not blank, do nothing). *This is only applicable to THIS Scenario

11 MOVE down one row to start over loop process

<b>* WHAT TO DO IF THERE IS NO "NO SRAN" ROW with the SAME NSN - available to use as source data? </b>
a.****** If NO “NO SRAN” row exists, IN THIS SCENARIO, highlight the row HOT PINK so the ANALYST can investigate it,beginning
then move to the next available row and re-start process from beginning
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top