+ Reply to Thread
Results 1 to 5 of 5

VBA to format imported document

  1. #1
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    VBA to format imported document

    I've attached a file where on the left is what I get imported from our system here at work. To the right is what I would like to end up with.

    I'm on page 137 of John Walkenbach's "Excel 2007 Power Programming with VBA". It's over 1000 pages so I'm not quite how to do this yet but I'm learning. Any help would be appreciated. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA to format imported document

    Hi rs1aj

    Try this Code in the attached...CTRL + x will fire the Code.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Re: VBA to format imported document

    This works perfect. Thank you for your time doing this.

    Now, lets see if I can figure out how you did this so I can do this sort of thing in the future by myself.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA to format imported document

    @jaslake & rsiaj,

    Very well done jaslake.

    Maybe you guys would want to consider adding the Trim function to the Code, just for in case leading or trailing spaces may happen.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA to format imported document

    @rs1aj

    You're welcome...glad I could help. Thanks for the Rep.

    @Winon

    Thanks for the kudos and thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Path from the imported document as cell value
    By Marcin4111 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2014, 05:58 AM
  2. Imported dates which won't format
    By clobug1 in forum Excel General
    Replies: 2
    Last Post: 05-22-2012, 05:24 PM
  3. Imported numbers will not format
    By pleiadeez7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2011, 01:06 PM
  4. removing spaces in imported document
    By xirokx in forum Excel General
    Replies: 5
    Last Post: 04-29-2008, 02:40 PM
  5. [SOLVED] How can I get an imported document to print whole page
    By UNITED KINGDOM in forum Excel General
    Replies: 1
    Last Post: 10-27-2005, 09:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1