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
8910.xlsx
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
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?
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Wayne Taylor (webtubbs)  thanks for the fast response

column b will have the numbers to count

like hereCapture.PNG
0
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Capture.PNG
1
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

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.
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Ejgil Hedegaard  Thanks Great JOb !
0
ShumsDistinguished Expert - 2017Commented:
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.Columns("J:K").Delete
Ws.Range("G3:H" & LRow).Sort Key1:="COUNT", Order1:=xlDescending, Key2:="NUM", Order2:=xlAscending, Header:=xlYes
Ws.Range("G3").Select
Application.ScreenUpdating = True
End Sub

Open in new window

Try in attached...
Adriana_8910.xlsm
1
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.