+ Reply to Thread
Results 1 to 2 of 2

how write to rows selected by auto/advanced filter in VBA code

  1. #1
    Registered User
    Join Date
    07-07-2011
    Location
    Zlin, Czech rep
    MS-Off Ver
    Excel 2003
    Posts
    1

    how write to rows selected by auto/advanced filter in VBA code

    Hi all,

    a have five columns in Excel 2010 sheet, ~ 90.000 rows.
    1) Sales manager, 2) customer, 3) artikl number, and two columns for coefficients c1 and c2.
    First three columns using for filtering data in macro code by automatic filter.

    I need set for column "D" value 1.23 for selected rows.
    How?


    Public Sub Test()
    Dim oRange As Range

    Set oRange = ActiveSheet.UsedRange

    With oRange
    ' start autofilter
    .AutoFilter

    .AutoFilter Field:=3, Criteria1:= _
    "=C6000*", Operator:=xlAnd

    .AutoFilter Field:=1, Criteria1:="=493" _
    , Operator:=xlAnd

    '-- here I need set for column "D" value 1.23 for selected rows
    'does exists any method, or something - for using oRange for this purpopse?
    'or exist different way?


    ' end autofilter
    .AutoFilter

    End With
    End Sub

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: how write to rows selected by auto/advanced filter in VBA code

    Cross-post: http://www.ozgrid.com/forum/showthread.php?t=155797

+ 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