I'm creating a template for others to use to process data that's hand-pasted in from another table in a .pdf file.
When I first open Excel and go to past in my table, it of course tries to put all the columns into a single cell. I can use the Text to Columns function to separate them out, and (jn Excel 2007) subsequent paste-ins of other tables automatically paste in correctly, which is nice. This continues even if I close the worksheet I'm working in an open a new one, but this behavior does not continue if I close out of Excel completely and re-open.
Because I want the worksheet I'm creating to be a template that others can use, is there a way for me to set it up so that the other users don't need to go through the text-to-column wizard at all?
Last edited by Gunther Maplethorpe; 07-26-2011 at 04:11 PM.
Reason: Mark as SOLVED
While pasting " text to columns " first time you are setting delimiters (tab,space,etc).After pasting first time reset all delimiters to default value and then use "text to columns" once again to paste next one selecting required delimiters.
I want to be able to save the worksheet in a state where the delimiters are already set, so that the next person who opens it can simply paste things in without having to go through the text-to-columns wizard.
I've been able to record a macro, so that users can paste, click a command button to run the macro, which goes through the first run of text-to-columns, and then they can continue pasting as they need to...but I'd like to skip that set, too, if at all possible.
One way would be to record a macro that does text to columns with the settings you wish. Then invoke that on an empty cell in the workbook open and workbook activate events.
Ah, that's a good thought. Though I'm restricted from using "on open" settings, due to the way these workbooks will be implemented, I think I can get by with "on activate", if it's not the initial tab. As VBA is definitely NOT my forte, can you give me an example of what language to use on either side of the "active" parts of my macro?
(That is, do I put something like "Private Sub Worksheet_Activate()" somewhere? And, can I take out hte defined range, and have it work on, say, anything pasted in on that particular tab?
It threw an error: "Run-time error '1004': No data was selected to parse."
Perhaps I need to have some dummy data in there to start? (And if I did, it would need to be somewhere far from the top of the page...say, in AA1000, or somewhere.)
Bookmarks