Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Word document as source of data set with variable separation of elements

0

 How would you export data sets contained in a Word document with variable separation of data elements within each data set to regular rows and columns?  When I save to a .txt file with no formatting, it appears the data sets are entered line by line in sequence until the last two elements, which are separated possibly by a tab, with a final line feed to the next data set.  If the next to last element expands to butt up against and hides the tab division in the text document, these last two elements seem concantenated with no separation.  

 Perhaps I can save as a formatted text document, which would preserve the tab, then replace all tabs with a line feed.   Then I can import to Excel using import wizard, if it recognizes a line feed as a field separation, resulting in one long row of elements, which your excellent macro would transpose using number of rows converted to columns, repeating for all data sets.  

 When running OCR for handwriting, as in lab notes, I convert the elements into data sets for an Excel spreadsheet to use in data analysis, but this requires verifying correct OCR.  

 Voice Recognition would be perhaps faster, if Excel had a consistent handle for commands to advance to next cell.  Perhaps there is a macro that works with Voice to Data when inserting a series of data into a spreadsheet without having to look at the screen and interrupt reading the series to force advancing to the next cell.  

Answer
Discuss

Discussion

Hi and welcome to the Forum.

I'm not clear on your question here, sorry. Do you have a Word document you want to import to Excel? (Excel VBA can be used to control Word, and move between cells of a table for example). Or are you asking if anyone knows how to use voice to reduce your effort? (Under the rules of the Forum you shouldn't be asking us to create a project for you) 

Please edit your original question to clarify, noting that you can use the Add Files... button to attach an Excel file (only, though you could embed a Word file within that).
John_Ru (rep: 4332) Jan 10, '22 at 7:44 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login