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
I beleive that a if Statement is need though again i'm new to coding![]()
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
Thanks
Bookmarks