Frustrating Formula, Need Help!

scliollio

New Member
Joined
Feb 22, 2017
Messages
6
Hey there,

Basically I have a tedious routine process that I think can be simplified by having excel do it for me in a formula. Only issue is that I'm not too great with these.

Any help would be greatly appreciated!!

The process is as follows:
  • I receive a spreadsheet everyday with many columns of data (~20), but I'm only concerned with a few of them
  • Everyday I must compare the "new" report with the "old" report
  • There is a unique field called "KEY ID" , a value field called "GSV", and another field called "Tank"
  • I manually go through and look for new KEY ID's (ones that appear on the new but not the old), if there is a new one, then it must be inserted directly below the previous KEY ID
  • Also if any of the GSV's have changed, then I must copy all of the "New" data (the ~20 fields) and paste it over the "Old" data (basically replace the line of data)
  • You cannot simply copy and paste all of the new data over the old data because they are sorted by tanks and it must remain in the order of the "old" (with the exception of new IDs being inserted)

Surely there is a formula(s) which can do this!

Essentially I need the formula to do the following

  1. Compare Line 1 "KEY ID" OLD with Line 1 "KEY ID" NEW
  2. If KEY ID's are different, insert new KEY ID and all associated data from NEW doc below Line 1
  3. If KEY ID's are the same, compare GSV values, if GSV value's differ, replace OLD docs line 1, with NEW docs line 1
  4. Repeat steps 1-3 for next line (continue to repeat until finished)


Attempting to type an example:
OLD
NEW
Tank
Key ID
GSV
Tank
Key ID
GSV
1001
566
11,514.60
1001
566
11,684.20
1002
532
19,549.80
1002
532
19,549.80
1003
544
8,557.40
1003
544
8,557.40
1004
589
14,522.40
1003
545
9,025.10
1004
566
21,901.50
1004
589
14,522.40
1006
502
12,156.80
1004
566
21,901.50
1006
502
12,036.70
1006
503
14,177.60

<tbody>
</tbody>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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