Consulting

Results 1 to 9 of 9

Thread: Solved: Filtering

  1. #1
    VBAX Tutor
    Joined
    Feb 2006
    Posts
    295
    Location

    Solved: Filtering

    I have a data sheet with part numbers and mfg codes that i am downloading from a main frame database. the data contains 2 columns and will have at least 1 row, no more that 10000.
    this is a 2-fold question.
    the data in column A are 11 characters long.
    i need to find all the part numbers with a "K" in the 9th position and a "0","3","4" or "6" in the 10th position. i want to move this data to the bottom of all my data, separated by a blank row.
    the last row of data contains 11 dashes in column A and 4 dashes in column B.
    i want to remove these dashes.
    the way i handle this now is to put a formula in column H to find the part numbers, sort and then cut & paste to the end.
    i started recording a macro but got stuck writing the formula. there must be an easier way.

    thanks
    vzach

  2. #2
    VBAX Tutor CCkfm2000's Avatar
    Joined
    May 2005
    Posts
    209
    Location
    try this...

    you need to use advance filter

    see attached file


  3. #3
    VBAX Tutor
    Joined
    Feb 2006
    Posts
    295
    Location
    thanks cckfm2000, but i don't know how to use the advanced filter to specifically filter out what i want, mainly a "0","3","4" or "6" in the 10th position, a "K" in the 9th position. And then place this data in column A, under the unfiltered data

  4. #4
    VBAX Tutor CCkfm2000's Avatar
    Joined
    May 2005
    Posts
    209
    Location
    ok here is another version which don't use advance filter but a sort routine.

    i've attached a file again.

    hope this is what you want....

  5. #5
    VBAX Tutor
    Joined
    Feb 2006
    Posts
    295
    Location
    i see where you are going with this. how would i be able to incorporate the formula in column C into the macro to filldown in column C to where the data ends in column A so that i don't have to do this manually? the data in column A will be no more than 10000 rows.

    thanks again for your efforts
    vzach

  6. #6
    VBAX Tutor CCkfm2000's Avatar
    Joined
    May 2005
    Posts
    209
    Location
    sorry for not replying to you sooner.
    just copy cell c5 down all the way to c10000.
    see attached file because i've updated the Formula in cell c5.


  7. #7
    VBAX Tutor
    Joined
    Feb 2006
    Posts
    295
    Location
    thanks cckfm2000,

    thanks for the update and thanks for the great formula.
    all is well now

    vzach

  8. #8
    VBAX Tutor CCkfm2000's Avatar
    Joined
    May 2005
    Posts
    209
    Location
    wow my first solution for help

    sorted

  9. #9
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Nice job CCkfm2000
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •