Ask Experts Questions for FREE Help !
Ask
    DrJ's Avatar
    DrJ Posts: 1,328, Reputation: 339
    Ultra Member
     
    #1

    Nov 16, 2011, 01:12 PM
    VBA for automatic Text to Columns
    Is there a way to write a VBA script that can accomplish the same as using Text to Columns? Right now, my users have to paste data into a spreadsheet, which then takes that data and fills in the necessary fields throughout the whole spreadsheet giving them instant access to all the calculations needed.

    All they have to do is paste into one cell... I was hoping Excel would save the spreadsheet ON the Data tab with the Text to Columns set up as Delimited with the delimiter set to a colon (:). However, it does not. Rather than having the user have to paste, select the Data tab, select Text to Columns, hit Next, uncheck Tab, check Other, put a : in the box, hit Next, and hit Finish (which may be easy enough for some but leaves too much room for error with a sales team), I was hoping there might be a more automated way of doing this.

    Any ideas?
    DrJ's Avatar
    DrJ Posts: 1,328, Reputation: 339
    Ultra Member
     
    #2

    Nov 16, 2011, 02:25 PM
    Holy cow! I just discovered the Record Macro button! I never knew Excel could do that! Makes it SOOOOO much easier than trying to code VB!

    For anyone else that may be looking into this, you have to enable the Developer tab (via Excel Options), select the developer tab, select Record Macro, do the command manually, then return to the Developer tab to stop recording... and it writes the macro for you!
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #3

    Nov 16, 2011, 02:43 PM
    Dude, Marcos, been around since the dawn of time ;)
    (well least since Office 2000, maybe 95)

    Where you been.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Nov 16, 2011, 04:18 PM
    Macros and the ability to record them go back to VisiCalc. Welcome to the wonderful world of spreadsheets.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Excel 15 digit issue, tried converting to text, text to column feature negates fix [ 6 Answers ]

I have the following numbers that exceed 15 characters that needs to be split into its own columns. Down the road, there would be thousands of such rows of data with the first couple set of unique numbers. 890432453253208820,5004500558,05CC,1,0,0,0,0,0,0, 0000,5.0000,2007-01-11...

From 3 columns of data creating a 4th column with the most recent columns data [ 2 Answers ]

Hello, I was wondering if anyone can help with an excel query I have... I have 3 columns of information and want to summarise the most recent information in to a 4th column. i.e. the most up to date information. If the most recent column is blank use the information from the 2nd most recent...

Finding the given text in different columns and place in other column [ 2 Answers ]

I have a worksheet where two columns contains name. I need to check that if one name is appering in any of these two columns then result shoule be shown in third column or if that name is not there then third column should be blank. If We have to find KEVIN MERRITT then result should be like...


View more questions Search