using vba to create new worksheets on import

Discussion in 'Software' started by dolphinwolf, Dec 8, 2005.

  1. dolphinwolf

    dolphinwolf Private E-2

    I'm relatively new using excel, and have very little understanding of programming vba. If gotten a few books, but they don't seem to cover what I need it to do. I use excel to import data from text files occasionally, and I need a way to set excel to sort the data according to one field and create new worksheets for each new number in this field. Example... There are 20 orders, and each order has a code. Some are 001, some are 002, and some are 003. These codes are in Column C. When I import the text file with all of them, I would like to get excel to create a worksheet for 001 with only those orders, a worksheet for 002 with only those orders, and so on. Is this possible?

    Thanks to anyone who can help!
     
  2. Kodo

    Kodo SNATCHSQUATCH

    you're using excel for the wrong thing. You should be using a database to store tracking information like this. If you want a desktop solution, look at MS Access, it is exactly what you need to make querying data much easier.
     
  3. dolphinwolf

    dolphinwolf Private E-2

    Thanks for the suggestion. Unfortunately, I can't email an access database bill to a customer - it's gotta be excel. I don't so much need to do queries - I just need a macro or something that I can tell to say If "Column C"=001 Then create a new worksheet titled 001 and put those rows in there. And the same for 002 and so on. ?? I just don't know how to say it in VBA speak or if it's capable of doing that. I'm sure you guys would know though - much more than I would anyway. I'm trying to eliminate the tedious task of cutting and pasting the data manually. As always - any ideas are super appreciated.

    Thanks a bunch! :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds