Results 1 to 2 of 2

Columns Shaded Differently Within Table

Threaded View

Gard5096 Columns Shaded Differently... 12-10-2013, 06:25 PM
Paul Re: Columns Shaded... 12-10-2013, 06:49 PM
  1. #1
    Forum Contributor
    Join Date
    09-06-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    225

    Columns Shaded Differently Within Table

    I posted this same question in the tables section of this forum because I'm not sure which of the two categories it should be in.

    I created a macro to pull data from a table in one worksheet, and copy to a seperate worksheet.


    For the example that I attached:

    -The data in the Acct Number, Call Days, and Aging Since Code columns were pulled from a table in the seperate worksheet.

    -The Age Group columns are produced by a macro, filling in each cell with a formula, and based off of the column in front of them.

    -Supervisor Response column is left blank.


    At this point in the macro, there is a bunch of copied data, and columns A, B, and D are still colored like the table that they were copied from. Now when my macro goes to format the them all into one table, the formatting is different between columns. Why is this happening? I want all columns to be formatted identically, so it appears as a uniform table.

    Here is the macro for when it formats to a table:



    ''Orientation Call
    
    With Sheets("Orientation Call")
        'keeps from editing top 2 rows
        If WorksheetFunction.CountA(.Cells) = 0 Then
            LR = 3
        Else
            LR = Sheets("Orientation Call").Range("A:F").Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
        End If
        
        If LR <= 2 Then LR = 3
    
        With Sheets("Orientation Call").Range("A3:F" & LR).Font
            .Name = "Arial"
            .Size = 11
        End With
    
        With Sheets("Orientation Call").Range("A3:F" & LR)
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
        End With
    
    End With
    
    
    ''Removes format, and changes to table
    
    Sheets("Orientation Call").Select
        LR = Range("A1:F" & Rows.Count).Find("*", Range("A1"), xlValues, xlWhole, , xlPrevious).Row
        Range("A3:F" & LR).Select
        With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        Range("A2:F" & LR).Select
        ActiveSheet.ListObjects.Add(xlSrcRange, Range("A2:F" & LR), , xlYes).Name = _
            "tOrientation"
            ActiveSheet.ListObjects("tOrientation").TableStyle = "TableStyleMedium15"
        Range("tOrientation[[#Headers],[CLIENT ID]]").Select
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. treated cells is same columns/rows differently
    By redking in forum Excel General
    Replies: 8
    Last Post: 06-15-2012, 09:50 PM
  2. Pivot Table - Duplicate Columns Filtered Differently?
    By jboysen in forum Excel General
    Replies: 1
    Last Post: 07-25-2009, 12:34 AM
  3. Pivot Table Calculating totals differently
    By esparzaone in forum Excel General
    Replies: 1
    Last Post: 02-21-2006, 09:01 PM
  4. [SOLVED] Pivot table displays data differently, Excel 2003
    By Perkyleo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2005, 12:40 PM
  5. [SOLVED] Printout doesn't match screen view (columns wrap differently).
    By SheriBee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2005, 01: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