Shawnathon
New Member
- Joined
- Feb 16, 2011
- Messages
- 45
OK, this is something I have to do over and over everyday so I need help building a macro for this process.
This is an example of what the sheet has:
A1 = 1 (a number from 1 - 5, represents a text file)
B1 = John Doe (Name)
B2 = John Doe Question 1
B3 = John Doe Answer 1
This will be one "set" that consists of 3 lines, I may have 1 "set" or several "sets" (increments of 3 lines) Example second "set" line 4 - 6, Third "set" line 7 - 9, etc.
The A1 Text file looks like this: [Green,Yellow] XXXXXXX [10,20,30,40,50] [Left,Right,Center]
I normally would have to open this text file and copy B1 (Name) and paste it where the "XXXXXXX" are, then I copy the text file which looks like this: [Green,Yellow] John Doe [10,20,30,40,50] [Left,Right,Center]
and then I paste it into a spinner which spins it into 30 different single line text using the combination's between the "[ ]".
I would imagine this process can be done all in excel and the finished 30 lines can be put on a "new sheet" from A1 - A30
Note: can the macro be set up so if i enter the file # (1 - 5) in cell A1 it can open and use that specific text file? Path and name of file are the same, just the # is different (1 - 5).
Then after that I would need B2 & B3, which are text files, to be imported starting under at A31 on the "new sheet"
Note: Can Text files in B2 & B3 be specified by number entered into a cell? For instance B2 is "John Doe Question 1", the only variation would be the #, so say if I need "John Doe Question 25", I would like to enter the #25 so it can import that text file. The path to the text file would be the same, just the # will be different. (Just like A1)
The final step will be to export the "new sheet" to a text file
I hope this is not too confusing, please let me know if there are any questions to help make this happen, thanks in advance.
Shawn
This is an example of what the sheet has:
A1 = 1 (a number from 1 - 5, represents a text file)
B1 = John Doe (Name)
B2 = John Doe Question 1
B3 = John Doe Answer 1
This will be one "set" that consists of 3 lines, I may have 1 "set" or several "sets" (increments of 3 lines) Example second "set" line 4 - 6, Third "set" line 7 - 9, etc.
The A1 Text file looks like this: [Green,Yellow] XXXXXXX [10,20,30,40,50] [Left,Right,Center]
I normally would have to open this text file and copy B1 (Name) and paste it where the "XXXXXXX" are, then I copy the text file which looks like this: [Green,Yellow] John Doe [10,20,30,40,50] [Left,Right,Center]
and then I paste it into a spinner which spins it into 30 different single line text using the combination's between the "[ ]".
I would imagine this process can be done all in excel and the finished 30 lines can be put on a "new sheet" from A1 - A30
Note: can the macro be set up so if i enter the file # (1 - 5) in cell A1 it can open and use that specific text file? Path and name of file are the same, just the # is different (1 - 5).
Then after that I would need B2 & B3, which are text files, to be imported starting under at A31 on the "new sheet"
Note: Can Text files in B2 & B3 be specified by number entered into a cell? For instance B2 is "John Doe Question 1", the only variation would be the #, so say if I need "John Doe Question 25", I would like to enter the #25 so it can import that text file. The path to the text file would be the same, just the # will be different. (Just like A1)
The final step will be to export the "new sheet" to a text file
I hope this is not too confusing, please let me know if there are any questions to help make this happen, thanks in advance.
Shawn