+ Reply to Thread
Results 1 to 7 of 7

macro to consolidate - help!

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,228

    macro to consolidate - help!

    hello

    i have a macro that goes in a set path (folder) and extracts data from the "master" worksheet and dumps it into my together.

    the issue im having is the range on my macro is set as pretty large
    .Range("B10:P1009").Copy

    1) i was wondering if it would be possible so if column B contains "0" then it not copy over row?
    2) also, for each row that is pasted, so after the last column, if i can show how make the macro go into worksheet called "YTD OT Summary" sheet and paste over the name of the person in cell C10 i.e. each time a row is copied over in the B:P range, in column Q, it also assigns the name of the person?

    this is my code...can someone pls help....i have over 75 files so i would appreciate it!

    also, how can i make excel not calculation or set the workbook calculation to manual, each time the macro goes into a workbook?

    Please Login or Register  to view this content.
    pls help..thx u
    Last edited by jw01; 03-09-2012 at 08:24 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macro to consolidate - help!

    Do you have a sample file that you use along with the above code, that you can attach ?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,228

    Re: macro to consolidate - help!

    hello

    i have attached a sample file (i have 70 of these files for different individuals).

    basically i would like my macro to work the way it is except

    1) if column B in the "master" sheet contains 0...then do not copy that row

    2) copy over the name in "ytd ots summary" from cell C10 to show person's name

    pls help!
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,228

    Re: macro to consolidate - help!

    not sure how to integrate this wid the code....if it helps?

    Application.WorksheetFunction.CountA(Range("B:B"))

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,228

    Re: macro to consolidate - help!

    any thoughts guys? pls and thx u

  6. #6
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,228

    Re: macro to consolidate - help!

    anything guys?!?!? pls and thx u

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macro to consolidate - help!

    We can do this. It will be far easier than checking for 0 before copying each file. What we can do is, copy all the data, and then filter /check for 0 in the column required (in your case column B) and delete those rows.

    What do you think?

+ 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