+ Reply to Thread
Results 1 to 14 of 14

Vba code needed, sumif 3 criteria match in the same row using a user form.

  1. #1
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Vba code needed, sumif 3 criteria match in the same row using a user form.

    I am checking the history sheet for the amount of scrap for one specific part. The parts are defined by size, description, and set. The match will be in columns A, B, and C. The total sum will come from the scrap column E. I have 3 combo boxes in a user form already set up with the data for each of the three. I need help with the formula. I have searched google for 3 hours straight, and I have come up with nothing close to this example.

    Any help would be appreciated. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    Post manualy the result in your sheet.

    I don't see the link with your tekst.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    Quote Originally Posted by oeldere View Post
    Post manualy the result in your sheet.

    I don't see the link with your tekst.
    I am not quite sure if I understand what you are asking, but if you mean manually like this then
    If row 3 column A value = ComboBox2Size.value And row 3 column B value = ComboBoxDescription.value And row 3 column C value = ComboBoxSet.value
    Then sum row 3 column E
    I need to loop until there is a no entry and it starts in row 3.
    Last edited by Spreadlover; 08-03-2013 at 04:58 PM.

  4. #4
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    Bump, bump, bump

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    What would be the desired (expected) result.

    Put it in your file and post it on the forum.

  6. #6
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    The expected result is on the history sheet.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    OK, the result is clear to me.

    and where do i find the data that need to be filled up in the history sheet?

  8. #8
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    In the left hand corner of the history sheet is a user form command button. When it is opened, there are 3 combo boxes on the right. After all 3 combo boxes are selected, the command button right below them will be selected and the expected result should be displayed in the text box. Everything is already loaded in the combo boxes. I just have not been able to get the formula right for the command button to work.

    The only thing I need is the formula to check the history sheet until it is empty. It will always start on row three and run until it is blank. There could be a thousand entries or more. If there is a way to check one criteria before another, then the first criteria it should look for is the product description. That will save time in the loop.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    I don't work with combo boxes, so I can't help you with that.

    I will put an request on call the calvary.

    http://www.excelforum.com/the-water-...49#post3349549
    Last edited by oeldere; 08-04-2013 at 10:57 AM.

  10. #10
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    It's not really the combo boxes I need the help with, but more how to word what is on the history sheet. The code should look something like this (I think)\

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    The combo boxes show the proper value, but I am not getting any value from the history sheet.

  12. #12
    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 code needed, sumif 3 criteria match in the same row using a user form.

    Hi Spreadlover

    Try the Code in the attached.
    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.

  13. #13
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Vba code needed, sumif 3 criteria match in the same row using a user form.

    Thank you. It works perfectly. I did move the code to the command button so I can check a few other things in the scrap column by the change in the combo boxes, but it works fine. I will post a copy of the final workbook for reference.

    This was my first experience with vba and a bit frustrating for me, but I like what I have learned and seen so far. It motivated me to order 3 books online and they will be here early next week.
    Attached Files Attached Files

  14. #14
    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 code needed, sumif 3 criteria match in the same row using a user form.

    You're welcome...glad I could help. 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. Excel Date criteria in SUMIF statement help needed
    By imcilwee in forum Excel General
    Replies: 2
    Last Post: 04-04-2012, 05:05 AM
  2. Match new password to specific user and update list via custom user form
    By Sargekd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2011, 09:40 AM
  3. USER FORM - help needed
    By mjancic in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2010, 08:02 AM
  4. [SOLVED] User Form will not scroll to Match Entry First Letter?
    By KBrenner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2006, 07:10 PM
  5. [SOLVED] User Form to Filter by Multiple Criteria
    By DevDaniel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2006, 11:25 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