Hello
I am new to VBA and I am having trouble with the program I want to develop.
My project involves looking at two data sets in different columns and rows and comparing them.
For example
CHRMT1(I) RMT1(J) Area1(K) CHRMT2(S) RMT2(T) Area2(U)
1 | 0.1 | 100 | 1 | 0.4 | 3
1 | 0.5 | 110 | 1 | 0.6 | 3.2
2 | 0.2 | 115 | 1 | 0.7 | 3.3
3 | 0.3 | 120 | 1 | 0.8 | 3.4
4 | 1.2 | 125 | 2 | 0.2 | 3.5
5 | 1.4 | 130 | 7 | 0.9 | 3.6
So what I would like the program to do is look at CHRMT1 and check if the value exists in CHRMT2. If it does, then look at RMT1 for CHRMT1 and check if a value within + or - 2% of RMT1 exists in RMT2. If that is the case (like for value 2) then Area 1 needs to be inserted beside Area2.
Additionally, if a value in CHRMT 1 is not present in CHRMT2 (ex. 3,4 or 5) then I would like the values to be inserted after 2 and before 7.
I am not sure how I can make the program search for value bigger than CHRMT1 and insert it before.
Any help would be greatly appreciated.
Thanks so much
Liliana