+ Reply to Thread
Results 1 to 2 of 2

Column Consolidate with example

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    FL
    MS-Off Ver
    Excel 2013
    Posts
    123

    Column Consolidate with example

    Srry for the repost excelforum is being laggy and wont let me edit the post an add an attachment.
    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
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-14-2013
    Location
    FL
    MS-Off Ver
    Excel 2013
    Posts
    123

    Re: Column Consolidate with example

    i don't need to use the code above but i thought it might help out

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 03-04-2014, 12:42 PM
  2. Consolidate from column to row on criteria
    By Steve N. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-28-2013, 09:53 PM
  3. [SOLVED] Consolidate a Column
    By par0016 in forum Excel General
    Replies: 5
    Last Post: 06-07-2012, 11:49 AM
  4. consolidate data into a single column
    By jyj9ja in forum Excel General
    Replies: 5
    Last Post: 01-19-2012, 03:22 PM
  5. Consolidate rows with the same value in a column
    By jonryan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-27-2010, 12:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1