ilhami caliskan

ilhami caliskan

  • NA
  • 76
  • 89.7k

find collisions with VBA in excel

Dec 22 2021 1:14 PM

Hi,

I got two coloumbs with values.

Coloumb C (range c4, c5, c6, c7, c8) have values 2,5 - 7,5 - 10 - 12,5 - 17

Coloumb D (range d4, d5, d6, d7, d8, d9, d10, d11) have values 1,4 - 3 - 4,5 - 6 - 7,4 - 9,7 - 12,6 - 17,2

I need to compare the zone of D (zone means D-0,15 and D+0,15)  with C for collisions.

if d14 (value between 1,25 and 1,55) collides with one of the values then (do in sub routine) color range d14 in red

if d15 (value between 2,85 and 3,15) collides with one of the values then (do in sub routine) color range d15 in red

and so on...

in the example values above 7,4 (d8) and 12,6 (d10) would have a collision and should be painted in red.

do anybody has an Idea how to write this code in excel VBA ?

thanx in forward


Answers (2)