+ Reply to Thread
Results 1 to 8 of 8

selection of suppliers, need help

  1. #1
    Registered User
    Join Date
    08-25-2009
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    10

    selection of suppliers, need help

    Hallo all competent knowledge carrier!

    I have the following Problem:

    I have a table which looks like this:

    mat.group:_564
    supplier:_____alpha____beta____cesar____dora
    volume:_____2000_____1500____3500____1200

    mat.group:_789
    supplier:_____beta____cesar_____gamma
    volume:_____2000_____1500_____3500

    mat.group:_123
    supplier:_____alpha____cesar_____dora
    volume:_____5000_____2000_____1000

    Now I would like to make an extract which shoul look like this:

    Supplier:_______alpha____beta____cesar____dora_____gamma
    mat.group:

    564___________2000_____1500____3500____1200________0
    789______________0_____2000____1500_______0_____3500
    123___________5000________0____2000____1000________0

    Total_________7000_____1500____7000____1200_____3500

    That means, that I want to present all existing suppliers, without doubling them in order to have an clear array with total volume per supplier.

    Could somebody help me please? I tried it per excel-function "IF", but the if-loops are limited....

    Can somebody please post me a solution by excel-function via macro?

    much thanks in advance

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: selection of suppliers, need help

    Post up a workbook we can look at instead of trying to juggle text, Excel forum...we're really good at juggling Excel sheets.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-25-2009
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: selection of suppliers, need help

    Yes, no problem

    please find enclosed my excel-sheet

    thanks in advance

    bartek bartek
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-25-2009
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: selection of suppliers, need help

    Hallo all

    could somebody please help me regarding my problem?

    thanks in advance

    bartek

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: selection of suppliers, need help

    Why do you need the sheet laid out like that, you are merely making work for yurself by this lay out. Stick to just one table.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: selection of suppliers, need help

    Hello BartekBartek,

    I agree with Roy about the layout, but if there is some reason you cannot change it then this macro will update the summary table. A button has been added to run the macro.

    I added row 4 and reduced the height to 1.50 points. This was done to make each table layout the same. Please do not remove this row.

    The macro creates temporary row and column labels by using a Dictionary Object. The intersection of the row and column points to the cell of the supplier and group number in the summary table. Here is the macro code...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  7. #7
    Registered User
    Join Date
    08-25-2009
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: selection of suppliers, need help

    Hello Leith Ross,

    first thanks for your effort! It works so far But I have some further requirements regarding that table.

    1. I want to uptade the figures without clicking on a button. I have read something about like an eventmakro. To go easy on resources we could also limit the application field. I think the macro code can look like this one here:

    Please Login or Register  to view this content.
    This is just a unfinished concepton as a suggestion, so would like to ask you to correct/to finish that code, please.

    2. In Range (B19:G19) I would like to read out all the suppliers which are listed in each of the material groups. The reason is, that the amount and names of suppliers per materialgroup can change depending on which product I have chosen beforehand. (The materialgroups will stay the same. Maximum Suppliers per mat.group = 6).

    3. Just a question: Make it sense to replace the sum-functions in range ("C24:G24") by a macro-code like i.e. this:

    Please Login or Register  to view this content.
    ...it could be also built in an event-macro-code, like stated above.

    I appreciate your knowledghe and thanks very much in advance.

    respectfully

    Bartek

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: selection of suppliers, need help

    Hello BartekBartek,

    As you can see from the code, automating the changes of the tables is quite a bit more complex than the button option. This is do to all the error checking and user options involved with the tables. The attached workbook has been modified and checked. I am listing the code for those who might be curious...

    Module1 -Support Macro and Variables
    Please Login or Register  to view this content.
    Worksheet_Change() Event Code
    Please Login or Register  to view this content.

+ 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