Hi all,
I am currently creating a documentation which will contain some VBA to import data into Cell A and then copy all the formulas down to the bottom of the data set. I have managed to do all the formulas relating to this so that's great except for the main area. I'm not sure how is the best way to do this.
It's difficult to explain so I'll try my best with examples:
The filename will always start like this:
1) c:\test\blablabla\Inbound\1709\1709-567890
2) c:\test\blablabla\Inbound\1709\1709-567890\
3) c:\test\blablabla\Inbound\1709\1709-567890\abc\def\ghi
At the very minimum it will be number 1 or it could be endless of (like number 3)
The numbers represent Year and Month
What I am trying to do is look for the \ after YYMM (main folder 1709) and then either of the following:
1) Look for the next \ and give me all the numbers in between the 2 \ (Example 2 will give me 1709-567890)
I do have a formula but this only works for Example 2, the formula is the length of the filename - the last \ will give me the results in between. However this will not work for 1 and 3.
Does anyone have any suggestion on what would be the best formula to use
Here is the formula for example 2 if you think this is a good way of doing this:
Hope this helpsPlease Login or Register to view this content.
Thanks
Bookmarks