View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Splitting a text file into individual worksheets

Each department number appears in its own column?

If yes, try importing the data into one worksheet, then try...

Ron de Bruin's EasyFilter addin:
http://www.rondebruin.nl/easyfilter.htm

Code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- replaces old data with current.
AdvFilterCity.xls 55 kb

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Sam Chambers wrote:

I have a large (8,000 lines) text file that I need to import into Excel. The
thing is that I need to get the file into separate worksheets, based on
department number. The departments change about every 50 lines or so (it's
variable).

I've racked my brain and can't think of a way to do this, other than doing
it manually. Any ideas?


--

Dave Peterson