concreteinterface
Board Regular
- Joined
- Jul 10, 2008
- Messages
- 144
Hi! It's been a while since I've been to the board. Happy to see you all here.
I've hadn't had to build many VBA programs lately and if I do, I've built up a pretty good library of VBA examples to help get me through.
I am working on a pet project using data from a golf launch monitor to map out golf shot dispersion.
The data exported gives many different values, but the values I am working with are total yardage of the shot and how many yards the shot was left (negative value) or right (positive value).
I've created a macro to form a grid with a 10% adder to all yardages to give the mapping some room.
In the top row, starting in the B2, I list the yardages (left to right). -60, -59, -58, ......... , 58, 59, 60. Then I list the total yardage in the A column starting in A2. 230, 229, 228, ..... 3, 2, 1, 0.
I've been able to use a Find function to look in the 1:1 row and find 0, then the A:A column to find 0. Then I get the address of both and make the resulting cell address a green color signifying the tee.
I tried to then apply this logic to place my shots, so find -10 in A:A and 210 in 1:1 and make that a red cell. The problem is that no matter what I tried, the Find function wasn't working all of the time. It worked for some, but not others. It was the first time I've seen an intermittent problem with a function. I tried to fix it for an hour.
Then I remembered something about using Index and Match to find crosspoints of data, but I don't remember how it's done or even what to call it so I can Google it.
Does anyone have any tips?
I've hadn't had to build many VBA programs lately and if I do, I've built up a pretty good library of VBA examples to help get me through.
I am working on a pet project using data from a golf launch monitor to map out golf shot dispersion.
The data exported gives many different values, but the values I am working with are total yardage of the shot and how many yards the shot was left (negative value) or right (positive value).
I've created a macro to form a grid with a 10% adder to all yardages to give the mapping some room.
In the top row, starting in the B2, I list the yardages (left to right). -60, -59, -58, ......... , 58, 59, 60. Then I list the total yardage in the A column starting in A2. 230, 229, 228, ..... 3, 2, 1, 0.
I've been able to use a Find function to look in the 1:1 row and find 0, then the A:A column to find 0. Then I get the address of both and make the resulting cell address a green color signifying the tee.
I tried to then apply this logic to place my shots, so find -10 in A:A and 210 in 1:1 and make that a red cell. The problem is that no matter what I tried, the Find function wasn't working all of the time. It worked for some, but not others. It was the first time I've seen an intermittent problem with a function. I tried to fix it for an hour.
Then I remembered something about using Index and Match to find crosspoints of data, but I don't remember how it's done or even what to call it so I can Google it.
Does anyone have any tips?