Tigerexcel
Active Member
- Joined
- Mar 6, 2020
- Messages
- 493
- Office Version
- 365
- 2019
- Platform
- Windows
I receive files that need updating based on whether personnel belong to a particular unit or have a particular characteristic.
Let's say that Tom, Jane and Andy don't need updating of their files but everyone else does. I'd like to create a macro that loops through all the records but leaves Tom, Jane and Andy's records intact. I can create a macro with an if statement that can test a value but I'm not sure how do that with a string. The macro would have to loop through a range of cells and then act if the name does not match a pre-defined list (or array?). I have run into this situation before where a macro that can do what I'm requesting would be useful for other situations so would appreciate any suggestions.
Let's say that Tom, Jane and Andy don't need updating of their files but everyone else does. I'd like to create a macro that loops through all the records but leaves Tom, Jane and Andy's records intact. I can create a macro with an if statement that can test a value but I'm not sure how do that with a string. The macro would have to loop through a range of cells and then act if the name does not match a pre-defined list (or array?). I have run into this situation before where a macro that can do what I'm requesting would be useful for other situations so would appreciate any suggestions.