I currently have an excel worksheet set to import certain values from a Text file. Below code was written to import certain values from specific ranges in the text file.
Basically on my excell worksheet the cell D23 imports a range of values from the text file. The range is named WPB = Range("$E$46") - Range("$E$44") - Range("$B$30")
Now the import works perfectly for Infort and Nabbert text files however Rotton text file has a diffrent configuration and the import does not work.
For the the import to work on Rotton the range should be WPB = Range("$E$66") - Range("$E$64") - Range("$B$30")
How can I adjust the code to keep so it works for all 3 text files considedring the range for Rotton is diffrent? Basically I do not want to create anothere excecl worksheet for Rotton only, my goal is to have the same excel worksheet to import the files regardless of their configuration
Bookmarks