if you see the attached example. when the code enters in the abbreviated data i would also like to add a , and a space then the corresponding client code. see the attached
the current code is
Sub kleptilian()
Dim CheckRange As Range
Dim Cell As Range
Set CheckRange = Range("E2:E" & Cells(Rows.Count, "E").End(xlUp).Row)
For Each Cell In CheckRange
If Cell.Offset(0, 2) = "" Then Cell.Offset(0, 2) = abbr(Cell.Value)
Next
End Sub
Function abbr(s As String) As String
If s = "A/R Adjustments Journal" Then
abbr = "A/R AdjuJou"
ElseIf s = "Accounts Payable" Then
abbr = "AccPay"
ElseIf s = "Direct Bill" Then
abbr = "DirBill"
ElseIf s = "Direct Bill Invoice Receivable" Then
abbr = "DB InvRec"
ElseIf s = "Direct Bill Receipt" Then
abbr = "DB Receipt"
ElseIf s = "Direct Bill Disbursements" Then
abbr = "DB Disburs"
ElseIf s = "Disbursements Journal" Then
abbr = "DisburJour"
ElseIf s = "Financial Management Journal" Then
abbr = "FinManJou"
ElseIf s = "Payables Adjustment" Then
abbr = "PayAdjust"
ElseIf s = "Payables Check" Then
abbr = "PayCheck"
ElseIf s = "Receipts Journal" Then
abbr = "RecJour"
ElseIf s = "Sales Journal" Then
abbr = "SalJour"
ElseIf s = "Received Payable" Then
abbr = "RecPay"
Else
abbr = ""
End If
End Function
Bookmarks