+ Reply to Thread
Results 1 to 4 of 4

filter and macros

Hybrid View

  1. #1
    Registered User
    Join Date
    07-19-2009
    Location
    toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    filter and macros

    hello

    i am using MS office2007

    in summary: I am creating a macro that runs a custom filter on a column and then run a command to do some functions on the filter results

    my problem:

    I need some help manipulating data after I ran a custom filter.

    how do i code the macro to let it run the commands ONLY on the filter results and not on the whole column

    thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    re: filter and macros

    possibly copy visible cells to a spare sheet,do changes then paste them back
    nope that doesnt work!
    sorry
    Last edited by martindwilson; 08-22-2009 at 09:43 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-19-2009
    Location
    toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    re: filter and macros

    Quote Originally Posted by martindwilson View Post
    possibly copy visible cells to a spare sheet,do changes then paste them back
    nope that doesnt work!
    sorry
    Thanks for your response.. but if you see how many excel files I need to work on!!! thats why i need do it using a macro

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    re: filter and macros

    This cade assume data is already filtered & that colum A has entry in the last used row
    Do your action where the message box code is

    Sub dddd()
       Dim l4Row As Long
       
       For l4Row = 2 To Cells(Rows.Count, "a").End(xlUp).Row Step 1
          If Rows(l4Row).EntireRow.Hidden = False Then
             MsgBox "Row " & l4Row
          End If
       Next l4Row
    End Sub
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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