+ Reply to Thread
Results 1 to 4 of 4

column consolidation

Hybrid View

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

    column consolidation

    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

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: column consolidation

    Hi,

    Unfortunately your post does not comply with Rule 3 of our Forum
    [URL="http://www.excelforum.com/forum

    Posting code between [noparse] [CODE] [/CODE] [/noparse] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the [COLOR="#FF0000"]#[/COLOR] icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: column consolidation

    Hi,

    Unfortunately your post does not comply with Rule 3 of our Forum
    [URL="http://www.excelforum.com/forum

    Posting code between [noparse] [CODE] [/CODE] [/noparse] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the [COLOR="#FF0000"]#[/COLOR] icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: column consolidation

    Hi,

    Unfortunately your post does not comply with Rule 3 of our Forum
    [URL="http://www.excelforum.com/forum

    Posting code between [noparse] [CODE] [/CODE] [/noparse] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the [COLOR="#FF0000"]#[/COLOR] icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

+ 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. column consolidation
    By kleptilian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-23-2014, 11:56 AM
  2. Duplicate a column of information in my consolidation code.
    By Dremzy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2014, 08:39 AM
  3. Replies: 4
    Last Post: 12-16-2010, 03:18 AM
  4. Consolidation by multiple workbooks by both column and rows
    By Miraun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2010, 04:54 PM
  5. Column Consolidation
    By Asif Surti in forum Excel General
    Replies: 2
    Last Post: 09-19-2010, 02:05 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