View Single Post
 
Old 08-31-2014, 10:57 PM
jolivanes jolivanes is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Sep 2011
Posts: 91
jolivanes will become famous soon enough
Default

Would this work?
Names are in Column B and Columns C and D are free to use.
Change references as required.
Code:
Sub Try_This()
    Dim lr As Long, j As Long
    Application.ScreenUpdating = False
    lr = Cells(Rows.Count, 2).End(xlUp).Row    '<----- Column B with names
    For j = 1 To 26
        Cells(j, 3).Value = Chr(64 + j)    '<----- Column C is temporary used
        Cells(j, 4).Formula = "=COUNTIF(RC[-2]:R[" & lr & "]C[-2],RC[-1] & ""*"")"    '<----- Column D has formula
        Cells(j, 4).Value = Cells(j, 4).Value
    Next j
    'Range("C1:C" & Cells(Rows.Count, 3).End(xlUp).Row).ClearContents
    Application.ScreenUpdating = True
End Sub
Reply With Quote