TedX
Board Regular
- Joined
- Apr 18, 2021
- Messages
- 122
- Office Version
- 365
- Platform
- Windows
Hi Friends,
I get some data for a horse race which includes a number, the horse's name, then another number then a person's name. The pattern repeats over and over and all I want is the horse's name. So if you look at the first row, I don't want the number, the dot or the space, what I do want is CRAFTY EAGLE without any trailing spaces. The pattern is, I want to keep row 1, then 4, then 7 and so on. In other words, I want to delete the following two rows after every row I want to keep. I've coloured in the rows I don't want in pink. I thought if the loop doing the row deletions was running, it might as well trim up the name by getting rid of the number, dot and space. My issue is, there will be one-digit and two-digit numbers, for example: (1. Crafty Eagle and 11. Awesome John). As a side note, so you feel sorry for me, after numerous attempts, and watching dozens of videos and tutorials on Loops, there is something about them that messes with my head, I think I am just scared of them, it's psychological. Can someone please write a macro that creates the loop, there are likely to be around 550 horse names on a busy day. TIA
I get some data for a horse race which includes a number, the horse's name, then another number then a person's name. The pattern repeats over and over and all I want is the horse's name. So if you look at the first row, I don't want the number, the dot or the space, what I do want is CRAFTY EAGLE without any trailing spaces. The pattern is, I want to keep row 1, then 4, then 7 and so on. In other words, I want to delete the following two rows after every row I want to keep. I've coloured in the rows I don't want in pink. I thought if the loop doing the row deletions was running, it might as well trim up the name by getting rid of the number, dot and space. My issue is, there will be one-digit and two-digit numbers, for example: (1. Crafty Eagle and 11. Awesome John). As a side note, so you feel sorry for me, after numerous attempts, and watching dozens of videos and tutorials on Loops, there is something about them that messes with my head, I think I am just scared of them, it's psychological. Can someone please write a macro that creates the loop, there are likely to be around 550 horse names on a busy day. TIA
1. CRAFTY EAGLE |
-5 |
R Jones (a) |
2. CHAIN OF GOLD |
-4 |
Ms R King |
3. PREFERRAL (NZ) |
-7 |
T Berry |
4. PRINCESS RAYAA |
-11 |
J Collett |
5. SILENT RAINDROPS |
-12 |
S Clipperton |
6. PINK BAROQUE |
-10 |
K McEvoy |
7. IN FRONT |
-1 |
A Adkins |
8. OFFANEASY (NZ) |
-2 |
Ms E Hennessy (a) |
9. KOVALICA (NZ) |
-5 |
J B McDonald |
10. GREEN SHADOWS |
-1 |
Z T Lloyd (a) |
11. AWESOME JOHN |
-7 |
B Avdulla |