Report with Grouping

Pestomania

Active Member
Joined
May 30, 2018
Messages
332
Office Version
  1. 365
Platform
  1. Windows
I have a long employee list (over 18000 rows) that I am trying to create a roster.

I am trying to create a roster for ALL managers, regardless of which Manager column they fall in.

I am trying to make the manager roster, grouped by downline managers.

So a report for someone listed as Mrg 3, would have their report grouped by anyone that is a Mgr 2 who reports to that person and then anyone who is Mgr 1 that reports to Mgr 2 which reports to Mgr 3.

I don't think this makes sense, but I am going to try and make a report of what this might look like.

Data File:
BCM Copy of Organziational Structure (for upload).xlsx
ABCDEFGHIJKLMNOP
1NameOrg Codeuser.mobileU.S. PersonCompanyDepartmentSiteIDorganizationalPerson.homePhoneEmailMgr1 NameMgr2 NameMgr3 NameMgr4 NameMgr5 NameMgr6 Name
2Employee 29Manager 86Manager 27Manager 109Manager 143Manager 119
3Employee 2Manager 53Manager 3Manager 10Manager 119
4Employee 30Manager 86Manager 27Manager 109Manager 143Manager 119
5Employee 35Manager 86Manager 27Manager 109Manager 143Manager 119
6Employee 4Manager 124Manager 79Manager 109Manager 143Manager 119
7Employee 31Manager 149Manager 79Manager 109Manager 143Manager 119
8Employee 7Manager 115Manager 91Manager 109Manager 143Manager 119
9Employee 8Manager 13Manager 104Manager 3Manager 10Manager 119
10Employee 9Manager 120Manager 74Manager 103Manager 40Manager 119
11Employee 10Manager 84Manager 12Manager 75Manager 119
12Employee 11Manager 50Manager 61Manager 134Manager 78Manager 34Manager 119
13Employee 12Manager 8Manager 12Manager 75Manager 119
14Employee 13Manager 84Manager 12Manager 75Manager 119
15Employee 14Manager 85Manager 66Manager 5Manager 24Manager 75Manager 119
16Employee 15Manager 16Manager 139Manager 75Manager 119
17Employee 16Manager 50Manager 61Manager 134Manager 78Manager 34Manager 119
18Employee 17Manager 16Manager 139Manager 75Manager 119
19Employee 18Manager 46Manager 101Manager 67Manager 10Manager 119
20Employee 19Manager 46Manager 101Manager 67Manager 10Manager 119
21Employee 20Manager 96Manager 145Manager 34Manager 119
22Employee 21Manager 131Manager 91Manager 109Manager 143Manager 119
23Employee 22Manager 141Manager 91Manager 109Manager 143Manager 119
24Employee 23Manager 79Manager 109Manager 143Manager 119
25Employee 24Manager 77Manager 125Manager 3Manager 10Manager 119
26Employee 25Manager 125Manager 3Manager 10Manager 119
27Employee 26Manager 31Manager 69Manager 88Manager 17Manager 119
28Employee 27Manager 140Manager 31Manager 69Manager 88Manager 17Manager 119
29Employee 28Manager 141Manager 91Manager 109Manager 143Manager 119
30Employee 71Manager 115Manager 91Manager 109Manager 143Manager 119
31Employee 78Manager 108Manager 91Manager 109Manager 143Manager 119
32Employee 1Manager 121Manager 99Manager 109Manager 143Manager 119
33Employee 32Manager 142Manager 55Manager 43Manager 103Manager 40Manager 119
34Employee 33Manager 44Manager 75Manager 119
35Employee 34Manager 70Manager 28Manager 110Manager 144Manager 10Manager 119
36Employee 3Manager 102Manager 99Manager 109Manager 143Manager 119
37Employee 36Manager 128Manager 8Manager 12Manager 75Manager 119
38Employee 37Manager 14Manager 62Manager 56Manager 143Manager 119
39Employee 38Manager 84Manager 12Manager 75Manager 119
40Employee 39Manager 73Manager 66Manager 5Manager 24Manager 75Manager 119
41Employee 40Manager 135Manager 90Manager 97Manager 75Manager 119
42Employee 41Manager 90Manager 97Manager 75Manager 119
43Employee 42Manager 134Manager 78Manager 34Manager 119
44Employee 43Manager 49Manager 97Manager 75Manager 119
45Employee 44Manager 90Manager 97Manager 75Manager 119
46Employee 45Manager 80Manager 43Manager 103Manager 40Manager 119
47Employee 46Manager 95Manager 133Manager 106Manager 19Manager 40Manager 119
48Employee 47Manager 81Manager 105Manager 18Manager 37Manager 40Manager 119
49Employee 48Manager 7Manager 42Manager 113Manager 40Manager 119
50Employee 49Manager 58Manager 150Manager 107Manager 40Manager 119
51Employee 50Manager 35Manager 11Manager 69Manager 88Manager 17Manager 119
52Employee 51Manager 104Manager 3Manager 10Manager 119
53Employee 52Manager 9Manager 93Manager 4Manager 112Manager 40Manager 119
54Employee 53Manager 64Manager 30Manager 42Manager 113Manager 40Manager 119
55Employee 54Manager 20Manager 63Manager 15Manager 67Manager 10Manager 119
56Employee 55Manager 117Manager 65Manager 106Manager 19Manager 40Manager 119
57Employee 56Manager 51Manager 147Manager 48Manager 37Manager 40Manager 119
58Employee 57Manager 23Manager 129Manager 21Manager 88Manager 17Manager 119
59Employee 58Manager 118Manager 92Manager 107Manager 40Manager 119
60Employee 59Manager 25Manager 47Manager 59Manager 143Manager 119
61Employee 60Manager 33Manager 138Manager 48Manager 37Manager 40Manager 119
62Employee 61Manager 148Manager 98Manager 60Manager 116Manager 89Manager 119
63Employee 62Manager 38Manager 114Manager 52Manager 89Manager 119
64Employee 63Manager 57Manager 132Manager 24Manager 75Manager 119
65Employee 64Manager 122Manager 123Manager 22Manager 37Manager 40Manager 119
66Employee 65Manager 41Manager 54Manager 29Manager 88Manager 17Manager 119
67Employee 66Manager 82Manager 1Manager 87Manager 112Manager 40Manager 119
68Employee 67Manager 26Manager 68Manager 2Manager 10Manager 119
69Employee 68Manager 39Manager 32Manager 74Manager 103Manager 40Manager 119
70Employee 69Manager 122Manager 123Manager 22Manager 37Manager 40Manager 119
71Employee 70Manager 127Manager 94Manager 36Manager 37Manager 40Manager 119
72Employee 5Manager 130Manager 99Manager 109Manager 143Manager 119
73Employee 72Manager 126Manager 71Manager 137Manager 44Manager 75Manager 119
74Employee 73Manager 83Manager 129Manager 21Manager 88Manager 17Manager 119
75Employee 74Manager 147Manager 48Manager 37Manager 40Manager 119
76Employee 75Manager 6Manager 146Manager 36Manager 37Manager 40Manager 119
77Employee 76Manager 100Manager 111Manager 60Manager 116Manager 89Manager 119
78Employee 77Manager 136Manager 76Manager 45Manager 17Manager 119
79Employee 6Manager 72Manager 99Manager 109Manager 143Manager 119
user


Similar report look:
BCM Copy of Organziational Structure (for upload).xlsx
ABCDEFGHIJKLM
3Employees who Report to Manager 109
4PresentLevel 3: Mgr 3 NameLevel 2: Mgr 2 NameLevel 1: Mgr1 NameLevel 0: EmployeesIDOrg CodePhoneDepartmentSiteBldgEmail
5Manager 109
6Manager 27
7Manager 86
8Employee 29
9Employee 30
10Employee 35
11Manager 79
12Employee 23
13Manager 124
14Employee 4
15Manager 149
16Employee 31
17Manager 91
18Manager 115
19Employee 7
20Employee 71
21Manager 131
22Employee 21
23Manager 141
24Employee 22
25Employee 28
26Manager 108
27Employee 78
28Manager 99
29Manager 121
30Employee 1
31Manager 102
32Employee 3
33Manager 130
34Employee 5
35Manager 72
36Employee 6
Sheet1
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Here you have a code to create the report by manager.

How it works:
1. The initial data must be as you presented it in the "User" sheet.

2. The order of the output data from columns B to J is as you have them in the "User" sheet. If you require another output order, simply change the order in the "User" sheet.
Dante Amor
BCDEFGHIJ
1Org Codeuser.mobileU.S. PersonCompanyDepartmentSiteIDorganizationalPerson.homePhoneEmail
user


3. The output sheet will be "Sheet1".

4. Create a new sheet and name it "Temp", it is necessary for the macro process.

5. On Sheet1 create a button and assign the macro "GlobalMacro" to it.

6. On Sheet1 in cell A3 you must enter a valid manager name and press the button.

7. Put all of the following code in a module:

VBA Code:
Option Explicit

Dim a As Variant, b As Variant, j As Long, k As Long
Dim dic As Object
Dim shU As Worksheet, sh1 As Worksheet, shT As Worksheet

Sub GlobalMacro()
  Set shU = Sheets("user")
  Set sh1 = Sheets("Sheet1")
  Set shT = Sheets("Temp")
  Dim f As Range

  Application.ScreenUpdating = False
  If sh1.Range("A3").Value = 3 Then
    MsgBox "Fill A3 cell"
    Exit Sub
  End If
  Set f = shU.Range("K:AZ").Find(sh1.Range("A3").Value, , xlValues, xlWhole, , , False)
  If f Is Nothing Then
    MsgBox "Manager does not exists"
    Exit Sub
  End If
  
  Call GetUniqueValues
  Call HierarchyManger
  Call RepaintData
  Application.ScreenUpdating = True
End Sub

Sub HierarchyManger()
  Dim i As Long, sId As Variant, dic1 As Object, col As Variant
  
  Set dic = CreateObject("Scripting.Dictionary")
  Set dic1 = CreateObject("Scripting.Dictionary")
  sh1.Range("C2", sh1.Cells(Rows.Count, Columns.Count)).ClearContents
  
  a = shT.Range("A2:D" & shT.Range("C" & Rows.Count).End(xlUp).Row).Value2
  ReDim b(1 To UBound(a, 1), 1 To 1)
  ReDim c(1 To UBound(a, 1), 1 To UBound(a, 1))
  For i = 1 To UBound(a, 1)
    dic1(a(i, 3)) = a(i, 4)
  Next
  
  j = 1
  k = 1
  sId = sh1.Range("A3")
  b(j, k) = sId
  dic(sId) = k
  k = 2
  Call recur(sId)
  
  For i = 1 To j
    col = dic(b(i, 1))
    c(i, col) = b(i, 1)
    c(i, col + 1) = dic1(b(i, 1))
  Next
  sh1.Range("C5").Resize(dic.Count, UBound(c, 2)).Value = c
End Sub

Sub recur(n)
  Dim i As Long, personID As New Collection, num As Variant
  For i = 1 To UBound(a, 1)
    If a(i, 1) = n Then
      dic(a(i, 3)) = k
      personID.Add a(i, 3)
    End If
  Next
  For Each num In personID
    j = j + 1
    b(j, 1) = num
    k = k + 1
    Call recur(num)
    k = k - 1
  Next
End Sub

Sub GetUniqueValues()
  Dim c As Variant, d As Variant
  Dim i As Long, n As Long, nRow As Long, lr As Long, lc As Long, y As Long
  Dim dic2 As Object
  
  Set dic2 = CreateObject("Scripting.Dictionary")
  
  shT.Cells.ClearContents
  shU.Range("A:A").Copy shT.Range("F1")
  lc = shU.Cells(1, Columns.Count).End(1).Column
  shU.Range("K1", shU.Cells(1, lc)).EntireColumn.Copy shT.Range("G1")
  
  lr = shT.Range("F" & Rows.Count).End(3).Row
  lc = shT.Cells(1, Columns.Count).End(1).Column
  d = shT.Range("F2", shT.Cells(lr, lc)).Value
  ReDim c(1 To lr * lc, 1 To 4)
  
  For n = 1 To UBound(d, 2)
    For i = 1 To UBound(d, 1)
      If d(i, n) <> "" Then
        dic2(d(i, n)) = Empty
      End If
    Next
  Next
  
  shT.Range("C2").Resize(dic2.Count, 1).Value = Application.Transpose(dic2.keys)
  dic2.RemoveAll
  c = shT.Range("A2", shT.Range("C" & Rows.Count).End(3)).Value
  For i = 1 To UBound(c)
    dic2(c(i, 3)) = i
  Next

  For n = 1 To UBound(d, 2) - 1
    For i = 1 To UBound(d, 1)
      If d(i, n) <> "" Then
        nRow = dic2(d(i, n))
        c(nRow, 1) = d(i, n + 1)
      End If
    Next
  Next

  With shT.Range("A2").Resize(UBound(c, 1), UBound(c, 2))
    .Value = c
    .Sort shT.Range("C2"), xlAscending
  End With
End Sub

Sub RepaintData()
  Dim c As Variant, d As Variant
  Dim f As Range
  Dim dic1 As Object
  Dim lr As Long, lc As Long, i As Long, n As Long
  Dim nRow As Long, col As Long, nCol As Long, nLevel As Long
  
  Set dic1 = CreateObject("Scripting.Dictionary")
  Set f = sh1.Cells.Find("*", , xlValues, xlPart, xlByRows, xlPrevious)
  lr = f.Row
  Set f = sh1.Cells.Find("*", , xlValues, xlPart, xlByColumns, xlPrevious)
  lc = f.Column
  
  c = sh1.Range("C5", sh1.Cells(lr, lc)).Value
  d = shU.Range("A2:J" & shU.Range("A" & Rows.Count).End(3).Row).Value
  
  For i = 1 To UBound(d, 1)
    dic1(d(i, 1)) = i
  Next
  
  For n = 1 To UBound(c, 2) - 1
    For i = 1 To UBound(c, 1)
      If c(i, n) <> "" Then
        If dic1.exists(c(i, n)) Then
          c(i, UBound(c, 2)) = c(i, n)
          c(i, n) = ""
        End If
      End If
    Next
  Next
  
  ReDim e(1 To UBound(c, 1), 1 To 9)
  For i = 1 To UBound(c, 1)
    If c(i, UBound(c, 2)) <> "" Then
      If dic1.exists(c(i, UBound(c, 2))) Then
        nRow = dic1(c(i, UBound(c, 2)))
        For col = 2 To UBound(d, 2)
          e(i, col - 1) = d(nRow, col)
        Next
      End If
    End If
  Next
  
  sh1.Range("C5").Resize(UBound(c, 1), UBound(c, 2)).Value = c
  sh1.Cells(5, lc + 1).Resize(UBound(e, 1), UBound(e, 2)).Value = e
  sh1.Cells(4, lc + 1).Resize(1, 9).Value = shU.Range("B1:J1").Value
  Set f = shU.Cells.Find(sh1.Range("A3").Value, , xlValues, xlWhole, xlByColumns, xlPrevious)
  
  nCol = 3
  nLevel = f.Column - Columns("K").Column + 1
  For col = f.Column To Columns("K").Column Step -1
    sh1.Cells(4, nCol).Value = "Level " & nLevel & ": " & shU.Cells(1, col).Value
    nCol = nCol + 1
    nLevel = nLevel - 1
  Next
  sh1.Range("B4").Value = "Present"
  sh1.Cells(4, nCol).Value = "Level 0: Employees"
  sh1.Cells.EntireColumn.AutoFit
End Sub

Before run macro in Sheet1:
1728747995667.png

After Run GlobalMacro:
1728748104636.png



----- --
Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
----- --
 
Upvote 0
Here you have a code to create the report by manager.

How it works:
1. The initial data must be as you presented it in the "User" sheet.

2. The order of the output data from columns B to J is as you have them in the "User" sheet. If you require another output order, simply change the order in the "User" sheet.
Dante Amor
BCDEFGHIJ
1Org Codeuser.mobileU.S. PersonCompanyDepartmentSiteIDorganizationalPerson.homePhoneEmail
user


3. The output sheet will be "Sheet1".

4. Create a new sheet and name it "Temp", it is necessary for the macro process.

5. On Sheet1 create a button and assign the macro "GlobalMacro" to it.

6. On Sheet1 in cell A3 you must enter a valid manager name and press the button.

7. Put all of the following code in a module:

VBA Code:
Option Explicit

Dim a As Variant, b As Variant, j As Long, k As Long
Dim dic As Object
Dim shU As Worksheet, sh1 As Worksheet, shT As Worksheet

Sub GlobalMacro()
  Set shU = Sheets("user")
  Set sh1 = Sheets("Sheet1")
  Set shT = Sheets("Temp")
  Dim f As Range

  Application.ScreenUpdating = False
  If sh1.Range("A3").Value = 3 Then
    MsgBox "Fill A3 cell"
    Exit Sub
  End If
  Set f = shU.Range("K:AZ").Find(sh1.Range("A3").Value, , xlValues, xlWhole, , , False)
  If f Is Nothing Then
    MsgBox "Manager does not exists"
    Exit Sub
  End If
 
  Call GetUniqueValues
  Call HierarchyManger
  Call RepaintData
  Application.ScreenUpdating = True
End Sub

Sub HierarchyManger()
  Dim i As Long, sId As Variant, dic1 As Object, col As Variant
 
  Set dic = CreateObject("Scripting.Dictionary")
  Set dic1 = CreateObject("Scripting.Dictionary")
  sh1.Range("C2", sh1.Cells(Rows.Count, Columns.Count)).ClearContents
 
  a = shT.Range("A2:D" & shT.Range("C" & Rows.Count).End(xlUp).Row).Value2
  ReDim b(1 To UBound(a, 1), 1 To 1)
  ReDim c(1 To UBound(a, 1), 1 To UBound(a, 1))
  For i = 1 To UBound(a, 1)
    dic1(a(i, 3)) = a(i, 4)
  Next
 
  j = 1
  k = 1
  sId = sh1.Range("A3")
  b(j, k) = sId
  dic(sId) = k
  k = 2
  Call recur(sId)
 
  For i = 1 To j
    col = dic(b(i, 1))
    c(i, col) = b(i, 1)
    c(i, col + 1) = dic1(b(i, 1))
  Next
  sh1.Range("C5").Resize(dic.Count, UBound(c, 2)).Value = c
End Sub

Sub recur(n)
  Dim i As Long, personID As New Collection, num As Variant
  For i = 1 To UBound(a, 1)
    If a(i, 1) = n Then
      dic(a(i, 3)) = k
      personID.Add a(i, 3)
    End If
  Next
  For Each num In personID
    j = j + 1
    b(j, 1) = num
    k = k + 1
    Call recur(num)
    k = k - 1
  Next
End Sub

Sub GetUniqueValues()
  Dim c As Variant, d As Variant
  Dim i As Long, n As Long, nRow As Long, lr As Long, lc As Long, y As Long
  Dim dic2 As Object
 
  Set dic2 = CreateObject("Scripting.Dictionary")
 
  shT.Cells.ClearContents
  shU.Range("A:A").Copy shT.Range("F1")
  lc = shU.Cells(1, Columns.Count).End(1).Column
  shU.Range("K1", shU.Cells(1, lc)).EntireColumn.Copy shT.Range("G1")
 
  lr = shT.Range("F" & Rows.Count).End(3).Row
  lc = shT.Cells(1, Columns.Count).End(1).Column
  d = shT.Range("F2", shT.Cells(lr, lc)).Value
  ReDim c(1 To lr * lc, 1 To 4)
 
  For n = 1 To UBound(d, 2)
    For i = 1 To UBound(d, 1)
      If d(i, n) <> "" Then
        dic2(d(i, n)) = Empty
      End If
    Next
  Next
 
  shT.Range("C2").Resize(dic2.Count, 1).Value = Application.Transpose(dic2.keys)
  dic2.RemoveAll
  c = shT.Range("A2", shT.Range("C" & Rows.Count).End(3)).Value
  For i = 1 To UBound(c)
    dic2(c(i, 3)) = i
  Next

  For n = 1 To UBound(d, 2) - 1
    For i = 1 To UBound(d, 1)
      If d(i, n) <> "" Then
        nRow = dic2(d(i, n))
        c(nRow, 1) = d(i, n + 1)
      End If
    Next
  Next

  With shT.Range("A2").Resize(UBound(c, 1), UBound(c, 2))
    .Value = c
    .Sort shT.Range("C2"), xlAscending
  End With
End Sub

Sub RepaintData()
  Dim c As Variant, d As Variant
  Dim f As Range
  Dim dic1 As Object
  Dim lr As Long, lc As Long, i As Long, n As Long
  Dim nRow As Long, col As Long, nCol As Long, nLevel As Long
 
  Set dic1 = CreateObject("Scripting.Dictionary")
  Set f = sh1.Cells.Find("*", , xlValues, xlPart, xlByRows, xlPrevious)
  lr = f.Row
  Set f = sh1.Cells.Find("*", , xlValues, xlPart, xlByColumns, xlPrevious)
  lc = f.Column
 
  c = sh1.Range("C5", sh1.Cells(lr, lc)).Value
  d = shU.Range("A2:J" & shU.Range("A" & Rows.Count).End(3).Row).Value
 
  For i = 1 To UBound(d, 1)
    dic1(d(i, 1)) = i
  Next
 
  For n = 1 To UBound(c, 2) - 1
    For i = 1 To UBound(c, 1)
      If c(i, n) <> "" Then
        If dic1.exists(c(i, n)) Then
          c(i, UBound(c, 2)) = c(i, n)
          c(i, n) = ""
        End If
      End If
    Next
  Next
 
  ReDim e(1 To UBound(c, 1), 1 To 9)
  For i = 1 To UBound(c, 1)
    If c(i, UBound(c, 2)) <> "" Then
      If dic1.exists(c(i, UBound(c, 2))) Then
        nRow = dic1(c(i, UBound(c, 2)))
        For col = 2 To UBound(d, 2)
          e(i, col - 1) = d(nRow, col)
        Next
      End If
    End If
  Next
 
  sh1.Range("C5").Resize(UBound(c, 1), UBound(c, 2)).Value = c
  sh1.Cells(5, lc + 1).Resize(UBound(e, 1), UBound(e, 2)).Value = e
  sh1.Cells(4, lc + 1).Resize(1, 9).Value = shU.Range("B1:J1").Value
  Set f = shU.Cells.Find(sh1.Range("A3").Value, , xlValues, xlWhole, xlByColumns, xlPrevious)
 
  nCol = 3
  nLevel = f.Column - Columns("K").Column + 1
  For col = f.Column To Columns("K").Column Step -1
    sh1.Cells(4, nCol).Value = "Level " & nLevel & ": " & shU.Cells(1, col).Value
    nCol = nCol + 1
    nLevel = nLevel - 1
  Next
  sh1.Range("B4").Value = "Present"
  sh1.Cells(4, nCol).Value = "Level 0: Employees"
  sh1.Cells.EntireColumn.AutoFit
End Sub

Before run macro in Sheet1:

After Run GlobalMacro:



----- --
Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
----- --
Hi @DanteAmor

I am receiving a Type Mismatch in the "Repaint Data". It's is saying that "C" which is someone's name in the format of Last, First MI is a type mismatch for UBound.

What are your thoughts?

1728906275643.png
 
Upvote 0
Are you testing with the data you put in your example?
If you are testing with another data set, you could put it here.

You could look at the "Sheet1" sheet and take a screenshot to see the data that macro put on that sheet, It should look like this:


1728918156385.png

Also an image of the "Temp" sheet should look like this:
1728918233796.png


----- --
I hope to hear from you soon.
Respectfully
Dante Amor
----- --
 
Last edited:
Upvote 0
In your example you have 150 managers, I tested them all and none of them gave me an error.
Can you put the data you are testing with here?
 
Upvote 0
I am receiving a Type Mismatch in the "Repaint Data".
In fact, if you reached that macro, the report has already finished and you can see the result on sheet 1.
What the "RepaintData" macro does is put headers and employee data in columns B to J.
 
Upvote 0
In fact, if you reached that macro, the report has already finished and you can see the result on sheet 1.
What the "RepaintData" macro does is put headers and employee data in columns B to J.
Hi @DanteAmor, here is the spot where the error populates. It hasn't pulled the data yet.

Not sure what I have done wrong.

1729169287841.png
 
Upvote 0
How it works:
1. The initial data must be as you presented it in the "User" sheet.
I don't see the "user" sheet in your image; the data should be on that sheet.


Did you try the macro with your test data that you put in post #1?
 
Upvote 0
Hi, I had updated the macro to work off of "Employee_Roster", I should have mentioned that.

It does work with the test data so I wonder if it is something to do with the commas.

1729175644159.png

1729175647923.png


1729175665770.png
 
Upvote 0
I had updated the macro to work off of "Employee_Roster", I should have mentioned that.
If you don't modify anything in the macro and try with the same data that you put in post #1?

Besides the name of the macro, did you modify anything else in the macro?

Are you copying the entire macro?

1729178030227.png

5. On Sheet1 create a button and assign the macro "GlobalMacro" to it.
Are you running the "GlobalMacro" macro?

Follow the instructions step by step.

----------------------------------------------------------------------

If you don't tell me what you modified in the macro and put here a sample of the data you are testing the macro with, we may not move forward.

I await your answers.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top