I have 2 worksheets, what I want to achieve is to count how many times an item in column B appears if column A has a value of "1" on it.
Worksheet 1 Column A (A2=1, A4=1, A7=1, A10=1, A13=1, A14=1, A15=1, A17=1, A18=1
Column B (B1= John Doe, B2= Philip Seymour, B3= Anthony Jones, B4= Thomas Moore, B5= Lindsey Lohan, B6= Rudy Duterte, B7= Philip Seymour, B8= Anthony Jones, B9= John Doe, B10= Philip Seymour, B11= Anthony Jones, B12= Thomas Moore, B13=Lindsey Lohan, B14= Rudy Duterte, B15= Anthony Jones, B16= John Doe, B17= Rudy Duterte
the result will be reflected in worksheet two like this
John Doe = 3 Philip Seymour = 1 Anthony Jones = 1 Thomas Moore = 1 Lindsey Lohan = 1 Rudy Duterte = 3
A
data go from row 2 to row 18, but your ColumnB
data go from row 1 to row 17.