+ Reply to Thread
Results 1 to 3 of 3

getting amounts of Rejected for different models and displaying amount

Hybrid View

bogesben getting amounts of Rejected... 10-03-2012, 12:55 AM
FDibbins Re: getting amounts of... 10-03-2012, 01:25 AM
bogesben Re: getting amounts of... 10-03-2012, 01:36 AM
  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    Newcastle Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    getting amounts of Rejected for different models and displaying amount

    Hi i'm new to this

    i have a spreadsheet the shows different models of phone, wether they are accepted or rejected, and reasons for rejections

    i9100 Galaxy SII 8MP WHITE phone Samsung 04/07/2012 ACCEPTED
    i9100 Galaxy SII 8MP WHITE phone Samsung 04/07/2012 REJECTED NFF
    i9100 Galaxy SII 8MP Black phone Samsung 04/07/2012 REJECTED PHYSICAL DAMAGE
    C3520 Black GSM Flip phone by Samsung 04/07/2012 REJECTED FLUID

    I was hoping to be able to see how many rejecteds their are per model and display it as a number, also how many of each reason for their rejected

    i have sucsced in use a Countif statement to count how many rejected or accepeted. though i can not work out or to then only count the rejected for each specific model

    Private Sub CommandButton1_Click()
    Dim x As Long
    Dim s As Long
    
    x = Range("b" & Rows.Count).End(xlUp).Row
    s = Range("a" & Rows.Count).End(xlUp).Row
    
    
    If x < 12 Then x = 12
    
    If a6 = "i9100 Galaxy SII 8MP WHITE phone Samsung" Then
    
    Range("b22") = Application.WorksheetFunction.CountIf(Range("B1:B" & x), "REJECTED")
    End If
    
    End Sub
    I beleive that a if Statement is need though again i'm new to coding

    Thanks
    Last edited by FDibbins; 10-03-2012 at 01:22 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: getting amounts of Rejected for different models and displaying amount

    bogusben, for future reference, plse use code tags around your code. i have added them for you this time

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here..

    regarding your question, do your really need VBA for this? if not, i would suggest you try playing around with the countifS() and sumifS() functions available in 2007
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    Newcastle Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: getting amounts of Rejected for different models and displaying amount

    Sorry FDibbins as i said still new to this.

    i will do for all future post

+ 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