+ Reply to Thread
Results 1 to 11 of 11

creating a macro that filters differences in columns

  1. #1
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    creating a macro that filters differences in columns

    Hi everyone. I'm very new to excel, but I had some help on this forum on how to make some filters for a speadsheet that I have. I attached the file that was created for me with the set rules, but I was wondering if there is a way that I can have these rules automatically applied to any spreadsheet I have formatted in this way. so I don't have to copy paste everytime) P.S. The columns may have up to 10,000 rows.....(Thanks.
    Attached Files Attached Files
    Last edited by chadder44; 03-04-2010 at 04:16 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I need help creating a macro with these rules...

    Hi Chadder, I'll take a look at your sample file. Meanwhile, read through the Forum Rules so you can use and follow them effectively.

    You'll need to edit that post above and GO ADVANCED to correct the title, it should specifically state the topic.

    Perhaps: "Applying Formatting to multiple sheets"
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: I need help creating a macro with these rules...

    ok thanks, and sorry, i thought I was being specific.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: creating a macro that filters differences in columns

    On Sheet1, I can't imagine indexing a column with SUMPRODUCT() in that manner. By the time you get down to the 10,000th row, you're adding tens of thousands of calcs PER cell. Holy cow.

    The sheet2 formulas are great.

    Can you just describe again what you want happening between sheet1 and sheet2? Don't refer to the existing formulas, just the process you need.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: creating a macro that filters differences in columns

    Sheet1, I can't imagine indexing a column with SUMPRODUCT() in that manner. By the time you get down to the 10,000th row, you're adding tens of thousands of calcs PER cell. Holy cow.
    That is why I did suggest an alternative in your other post using the TRUE/FALSE and Countif combination of helper columns..
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: creating a macro that filters differences in columns

    Perhaps this in D2, then copied down, accomplishes the same index values without all the overhead (as long as D1 is empty):

    =IF(EXACT(A2,B2),D1,D1+1)

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: creating a macro that filters differences in columns

    yes, perhaps.

  8. #8
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: creating a macro that filters differences in columns

    I just want the rows that are not EXACTLY the same between column A and B, to be copied over to sheet 2 (with the ID#'s copied along as well).

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: creating a macro that filters differences in columns

    The replacement formula I've suggested and your existing sheet2 seem to do a good job.

    Adding a formula to a cell then double-clicking the lower-right corner to copy it all the way down a dataset is simple and quick. What issue are you trying to solve?

  10. #10
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: creating a macro that filters differences in columns

    i was wondering if there was a way that i could load a spread sheet that only has sheet 1 with column A, B, and C, and loading a macro that creates sheet 2 with the filtered rows. This is something that I am trying to make more user friendly because I am not the only one who is doing this. We are contantly creating these spreadsheets with the 3 columns, and we need an easy way to creat sheet 2 that filters the rows we need to look at. If the only way is to copy all the formulas each and every time, then that will have to do. Thanks for all your help.

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: creating a macro that filters differences in columns

    I would think the simplest process is to have a two-sheet workbook already setup with column D filled out (and down a few 100 rows), and sheet2 filled out with the formulas already in a table going down a few 100 rows.

    Then, just paste the new data each time from your source book into columns A.B.C and voila!

+ 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