+ Reply to Thread
Results 1 to 14 of 14

Need Help modifing a MAS to Excel Report - THX!

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Need Help modifing a MAS to Excel Report - THX!

    I have attached a shortened Excel report that for Sage MAS and I need help modified so that easier to read 10,000 row report. Please help! Anything tips or suggestion, I'm all lost.

    - I'd like to remove the blank rows and column
    - Remove rows 4, 8, 35, 43, etc... all the stores
    -Filtering out each of the stores like row 7, 18, 34, etc...
    - Add another column before column A pulling out each of the salesman; 50-02 from 50-02X, 50-05 from 50-05C, 50-05F, 50-05S, etc...


    I'd appreciate all the help I can get, Thanks.


    Eric
    Last edited by elsoung; 10-05-2012 at 01:59 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Hello there,

    Can you tell me how you know that an entry is a store?

    Thanks!

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    The best way I say in Excel term is that there are characters is cell H-N and for that case I whole the entire row remove.
    Last edited by elsoung; 10-05-2012 at 01:59 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Try the following:

    Please Login or Register  to view this content.
    To insert the code:

    1. Make a copy of the worksheet you want to format, so if it doesn't turn out correctly you aren't messing up your original data
    2. Press Alt+F8 on your keyboard to bring up the macro window.
    3. Clear the macro name field and then type FormatMacro and select the Create option
    4. In between the Sub FormatMacro and End Sub copy and paste the above code. Anything that appears in green is a comment meant to help you understand.
    5. Close out of Visual Basic
    6. Press alt+F8 again and this time select the FormatMacro macro and then select Run.

    Let me know if this works for you!

  5. #5
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    Wow, thanks!

    I know I said taking the companies but if you look at the unformatted excel spreadsheet view you'll notice there two of the same company and in between it what they bought.

    Could you possible not remove the rows that have the companies in bold and red but still remove the companies that are bold and black?

    I could probably do in an easier not macro way.
    If you notice that 50-05C, 05-50F, 05-50S and etc are the same salesman person and the C, F, S, etc.. only state the closeout, Fall, Summer, etc... but could you possible integrate all in to one and leave the C, F, S out?

    Thanks a lot!

    Eric
    Last edited by elsoung; 10-05-2012 at 01:58 PM.

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Hello there,

    Okay I adjusted the code to reflect your first request but am a little confused by your second.

    I could probably do in an easier not macro way.
    If you notice that ex4.gif 50-05C, 05-50F, 05-50S and etc are the same salesman person and the C, F, S, etc.. only state the closeout, Fall, Summer, etc... but could you possible integrate all in to one and leave the C, F, S out?
    Could you please provide an example of what you are trying to do with the second request?

    Thanks!

  7. #7
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    Making another column and put the Salesman 05-50, it doesn't matter it is 50-05C, 05-50F, 05-50S because it's the same salesman so I can format into a table and do sorting such as this.

    Just wondering if there is a more efficient way to it than using the =left(cell, 5).

    Thanks.
    Last edited by elsoung; 10-05-2012 at 02:07 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Try updating the code to look like the following:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    Alright, thanks.

  10. #10
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    These a Run-time '91': Object variable or With block variable not set error in the script.

    error.gif

  11. #11
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Please press the debug button and tell me which line is highlighted. Thanks!

  12. #12
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    Line 62: rng.Select 'select the columns defined in the rng range

    error1.gif

  13. #13
    Registered User
    Join Date
    10-03-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Need Help modifing a MAS to Excel Report - THX!

    I'm trying to outline and group rows and column but I do it nothing happens Is there something restricting it?

  14. #14
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Need Help modifing a MAS to Excel Report - THX!

    Trying placing

    Please Login or Register  to view this content.
    above the errored line

    If you have already ran the code to delete all the empty rows then the code will error out because there's no rng to access.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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