Oceangirle
New Member
- Joined
- Mar 31, 2021
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
I am creating a VBA code...so far it allows the user to push a button and navigate to the proper folder. It also copies and pastes all of the rows and columns from the original file. However, I need to revise this a bit. I keep trying to create a loop so that only specific records are captured. I need the loop to look at the first two letters and capture everything that begins with ST and TT. However, I am really struggling with the final condition. From those ST and TT selections, I want the code to look between two hyphens, determine if 5 or 8 numbers lie within the two hyphens and if so to copy and paste those rows into the specified sheet. So, I want ST OR TT with 5 or 8 digits between two hyphens to be captured. How can I create the conditions so that the code works? Can someone help me with the code for this? I am thinking of using the Isnumber function variation but I am not certain this will work. Please help!