i searched everywhere i was not able to find a VBA Code that will do the following
1- ask for a file to import the following columns B, C, D, G, J, O, Q, M to row 3
2- Rearrange the imported columns to be
· O is Column 1
· G is column 2
· J is column 3 – it should be divided ( Step3)
· J is column 4 – it should be empty for now
· J is column 5– it should be empty for now
· C is column 6– it should be divided ( Step 4)
· C is column 7– it should be empty for now
· B is column 8
· D is column 9
· Q is column 10
· M is column 11
3- Dividing column “J”
column “J” should be divided to 3 columns, each dash represent a column
example:
BDDC09YS010010-SFNY 22 Deck-Cellar D Primary Tubular Framing Prefabrication
· “BDDC09YS010010” is column 4
· “SFNY 22 Deck” is column 5
· “Cellar D Primary Tubular Framing Prefabrication” is column 3
· If there is more than 3 dashes the code should ignore them
4- Dividing column “C”
column “C” should be divided to 2 columns, each dash represent a column
example:
SDD-PB2-101
· “SDD-PB2-101” is column 7
· “SDD” is column 6 (it will take the first part only up to the first dash)
I tried to gather several codes together from all over the internet, mixing so many codes did not end up well, I will really appreciate the help, I spent 1 week trying to do this I’m tired
1- ask for a file to import the following columns B, C, D, G, J, O, Q, M to row 3
2- Rearrange the imported columns to be
· O is Column 1
· G is column 2
· J is column 3 – it should be divided ( Step3)
· J is column 4 – it should be empty for now
· J is column 5– it should be empty for now
· C is column 6– it should be divided ( Step 4)
· C is column 7– it should be empty for now
· B is column 8
· D is column 9
· Q is column 10
· M is column 11
3- Dividing column “J”
column “J” should be divided to 3 columns, each dash represent a column
example:
BDDC09YS010010-SFNY 22 Deck-Cellar D Primary Tubular Framing Prefabrication
· “BDDC09YS010010” is column 4
· “SFNY 22 Deck” is column 5
· “Cellar D Primary Tubular Framing Prefabrication” is column 3
· If there is more than 3 dashes the code should ignore them
4- Dividing column “C”
column “C” should be divided to 2 columns, each dash represent a column
example:
SDD-PB2-101
· “SDD-PB2-101” is column 7
· “SDD” is column 6 (it will take the first part only up to the first dash)
I tried to gather several codes together from all over the internet, mixing so many codes did not end up well, I will really appreciate the help, I spent 1 week trying to do this I’m tired
Last edited: