+ Reply to Thread
Results 1 to 7 of 7

Worksheet consolidation, VBA. Stop copying column headers

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Worksheet consolidation, VBA. Stop copying column headers

    oh right right....

    great thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Worksheet consolidation, VBA. Stop copying column headers

    In the code below:
    For Each ws In Worksheets
            LR = ws.Range("A" & Rows.Count).End(xlUp).Row
                ws.Range("A2:F" & LR).Copy
                Me.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValuesAndNumberFormats
    Next ws
    
    LR = Range("A" & Rows.Count).End(xlUp).Row
    With Range("A2:F" & LR)
    What does the "&" mean in ws.range("A2:F" & LR)? Is it like the word AND?

    Same thing with [code] With Range("A2:F" & LR)?

    Also what does the following code do?
    .FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)=0"
    thanks
    Last edited by Lifeseeker; 02-21-2012 at 09:48 AM. Reason: few more clarifications needed

  3. #3
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Worksheet consolidation, VBA. Stop copying column headers

    Figured out what the last line do. It is for alternating row colors.

    Still need an answer to my first question though.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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