It's enough, now I calculate the difference between the two columns
and use
the result in the OFFSET function to get the correspondent value,
which I
need for my calculation.
=(G2-OFFSET(G2,0,-COLUMN()+MAX(IF($A$1:F$1="X",COLUMN($A$1:F$1))),
1,1))/
OFFSET(G2,0,-COLUMN()+MAX(IF($A$1:F$1="X",COLUMN($A$1:F$1))),1,1)
When I have an "X" in column "B", then it is equal to "= (G2-B2)/B2".
Or do you have a shorter solution?
Regards
Werner