[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"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.
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.
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
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
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
Open in new window
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.