I am trying to write a macro to determine if holes are too close together. On the attached file, why are rows 8-11 all highlighted? Where did I go wrong? Only lines 8 and 10 should be highlighted.
I am trying to write a macro to determine if holes are too close together. On the attached file, why are rows 8-11 all highlighted? Where did I go wrong? Only lines 8 and 10 should be highlighted.
Hi, tajennens,
either clear the formatting prior to running the macro or use an If-Else-Statement to color/uncolor the cells?
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
I'm a litte confused. I cleared the formatting. Then I run the macro and it highlights rows 8-11 when it should only be highlighting rows 8 and 10. There is already an if statement to highlight.
I've got it working now. Thanks!
Hi, tajennens,
do you mind sharing your solution?
Ciao,
Holger
Instead of having two different IF statements, I combined them with an AND and it seems to be working now.
If a <> b And Hypotenuse(Cells(a, 18), Cells(b, 18), Cells(a, 19), Cells(b, 19)) < Largest_Diameter(Cells(a, 24), Cells(b, 24)) Then
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks