V
Vasilis
I have two data bases, from a ground investigation which look like that:
DB#1
(a) Borehole (b) Depth from (c) Depth to (d) Soil Type
1 BH1 0m 2m Sand
2 BH1 2m 4m Clay
3 BH1 4m 7m Gravel
4 BH2 0m 1.5m Sand
5 BH2 1.5m 5m Clay
6 BH2 5m 8m Gravel
DB#2
(a) Borehole (b) Depth (c) pH test (d) Soil Type
1 BH1 2m 7.5 ?
2 BH1 5m 9.0 ?
3 BH2 5m 8.5 ?
What I want to do is add a column in Database #2 with the soil types. I.e.
to show what type of soil each pH test corresponds to.
I tried the if function in an array:
if(a1=DB#1-a1:a6,if(b1>=DB#1-b1:b6,if(c1<DB#1-c1:c6,d1:d6))))
However, what this does, is it find the first record that matches the first
'if' and then checks the second and third columns and if the conditions do
not work, it simply returns 'false'. What I want it to do is if one of the
conditions does not work to go to the next record.
What am I doing wrong? any help please?
Thank you
DB#1
(a) Borehole (b) Depth from (c) Depth to (d) Soil Type
1 BH1 0m 2m Sand
2 BH1 2m 4m Clay
3 BH1 4m 7m Gravel
4 BH2 0m 1.5m Sand
5 BH2 1.5m 5m Clay
6 BH2 5m 8m Gravel
DB#2
(a) Borehole (b) Depth (c) pH test (d) Soil Type
1 BH1 2m 7.5 ?
2 BH1 5m 9.0 ?
3 BH2 5m 8.5 ?
What I want to do is add a column in Database #2 with the soil types. I.e.
to show what type of soil each pH test corresponds to.
I tried the if function in an array:
if(a1=DB#1-a1:a6,if(b1>=DB#1-b1:b6,if(c1<DB#1-c1:c6,d1:d6))))
However, what this does, is it find the first record that matches the first
'if' and then checks the second and third columns and if the conditions do
not work, it simply returns 'false'. What I want it to do is if one of the
conditions does not work to go to the next record.
What am I doing wrong? any help please?
Thank you