List off name with following managers only

Archived-1715

New Member
Joined
Sep 5, 2012
Messages
28
List ID with following managers only

I have 5 column. A:E.

8600375469_886e57e58b.jpg



I need to seperate each ID for manager start column H

8600376285_85c8a26373_b.jpg


Thanks
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Re: List ID with following managers only

Sounds like a good job for a Pivot Table.
 
Upvote 0
Re: List ID with following managers only

Try this with H1 = Juan, J1 = Michael, K1 = Kerry, M1 = Paul, O1 = AJ

Regards,
Howard

Code:
Option Explicit
Sub MgrNameNumber()
Dim c As Range
Dim j, m, k, p, a As String
j = "Juan"
m = "Michael"
k = "Kerry"
p = "Paul"
a = "AJ"
For Each c In Range("E1:E" & Range("E" & Rows.Count).End(xlUp).Row)
  If c.Value = j Then
      c.Offset(0, -4).Copy Range("I100").End(xlUp).Offset(1, 0)
    ElseIf c.Value = m Then
      c.Offset(0, -4).Copy Range("K100").End(xlUp).Offset(1, 0)
    ElseIf c.Value = k Then
      c.Offset(0, -4).Copy Range("M100").End(xlUp).Offset(1, 0)
    ElseIf c.Value = p Then
      c.Offset(0, -4).Copy Range("O100").End(xlUp).Offset(1, 0)
    ElseIf c.Value = a Then
      c.Offset(0, -4).Copy Range("P100").End(xlUp).Offset(1, 0)
  End If
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,777
Messages
6,126,838
Members
449,343
Latest member
DEWS2031

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