count data single number

I will  have data in column "B"

need count the numebrs an show it in column G ans see times of ocurrence in column H

from top to minor in column H
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne Taylor (webtubbs)Commented:
What are the numbers in column C? The data you've provided only has each number listed once, but I assume they'll be in column B multiple times? Can you provide more data in your workbook, with an example output?
Wayne Taylor (webtubbs)  thanks for the fast response

column b will have the numbers to count

like hereCapture.PNG
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

abbas abdullaCommented:
Try this formula in cell H4 =sumproduct(countif(text($A$1:$A$100,"@"),"*"&G4&"*"))
abbas abdulla  thanks fot the fast reponse  but is not working
Ejgil HedegaardCommented:
Try attached.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
abbas abdullaCommented:
The formula I posted was tested in google sheets and it's working fine, no idea why it's not in excel. I will check back if no solution provided for you before.
Ejgil Hedegaard  Thanks Great JOb !
ShumsExcel & VBA ExpertCommented:
Ejgil already replied your question, here is another approach:
Sub SplitAndCount()
Dim Ws As Worksheet
Dim LRow As Long, i As Long, LastRow As Long, FirstLR As Long
Dim MyDict As Object
Dim MyCols As Variant, x As Variant, MyData As Variant
Dim NumCol As String
Set Ws = Worksheets("CDTA")
FirstLR = Ws.Range("G" & Rows.Count).End(xlUp).Row
LRow = Ws.Range("B" & Rows.Count).End(xlUp).Row
Set MyDict = CreateObject("Scripting.Dictionary")
MyCols = Array("J", "K")
NumCol = "G"
Application.ScreenUpdating = False

Ws.Range("G4:H" & FirstLR).ClearContents
Ws.Range("G3").Value = "NUM"
Ws.Range("H3").Value = "COUNT"
Ws.Range("J4:J" & LRow).FormulaR1C1 = "=LEFT(RC2,1)"
Ws.Range("K4:K" & LRow).FormulaR1C1 = "=RIGHT(RC2,1)"
Ws.Range("J4:K" & LRow).Value = Ws.Range("J4:K" & LRow).Value

For Each x In MyCols
    LastRow = Ws.Cells(Rows.Count, x).End(xlUp).Row
    MyData = Ws.Range(x & "4:" & x & LastRow).Value
    For i = 1 To UBound(MyData)
        If MyData(i, 1) <> "" Then MyDict(MyData(i, 1)) = 1
    Next i
Next x
Ws.Range(NumCol & "4").Resize(MyDict.Count, 1).Value = WorksheetFunction.Transpose(MyDict.Keys)
Ws.Range("H4:H" & LRow).FormulaR1C1 = "=COUNTIF(C10:C11,RC7)"
Ws.Range("H4:H" & LRow).Value = Ws.Range("H4:H" & LRow).Value
Ws.Range("G3:H" & LRow).Sort Key1:="COUNT", Order1:=xlDescending, Key2:="NUM", Order2:=xlAscending, Header:=xlYes
Application.ScreenUpdating = True
End Sub

Open in new window

Try in attached...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.