فیلتر متغیر - ماکرو

Collapse
X
 
  • زمان
  • نمایش
حذف همه
new posts
  • vhahoora

    • 2013/12/29
    • 12

    فیلتر متغیر - ماکرو

    سلام
    من میخوام یک ماکرو رکورد کنم که با اجرای این ماکرو،بیاد بر اساس مقدار یک سلول فیلتر کنه .
    مثلا در همین فایلی که قرار دادم با اجرای ماکرو بر اسا مقدار سلول g5 ، ستون b فیلتر بشه .
    ممنون
    فایل های پیوست شده
  • iranweld

    • 2015/03/29
    • 3341

    #2
    با سلام

    این ماکرو را تست بفرمایید
    مقداری که بایستی بر مبنای آن فیلتر شود را در سلول D1 قرار دهید

    کد PHP:
    Sub test()

        
    ActiveSheet.Range("$A:$B").AutoFilter Field:=2Criteria1:=Range("d1").Value_
            Operator
    :=xlAnd
    End Sub 
    فایل های پیوست شده
    Last edited by iranweld; 2015/08/26, 11:45.

    کامنت

    • vhahoora

      • 2013/12/29
      • 12

      #3
      سپاس فراوان از راهنمایی شما.
      امیدوارم موفق باشید .

      کامنت

      • DOLFIN

        • 2014/01/18
        • 149

        #4
        سلام دوست عزیز
        در لینک زیر فایلی موجوده که با براساس محدوده یا سلول select شده فیلتر رو انجام میده. واقعا فوق العادست.
        میتونید دانلود کنید و استفاده کنید.
        موفق با شید.
        Filtering is one of the most used feature in Excel. It is a quick way to take lots of data and narrow down to the subset we want. But here is one common filtering scenario that is slow as snail. Imagine you are looking at some sort of sales data (if you can't imagine, look at the above demo). Now, you want to filter this list for gender=male, profession=self-employed, product category = chocolates and  quantity = 1. If you use the right click, filter > filter by selected value approach, this will take several clicks. Wouldn't it be cool if you can select the entire combination and say filter? Unfortunately, no such feature exists in Excel. But you are not aiming to be ordinary in Excel.  You are aiming to be awesome in Excel. That means, you don't take no for answer. Fortunately, we can quickly write a VBA macro that filters a list by selection. So let's do that.
        [CENTER][FONT=times new roman][SIZE=7][I][B][COLOR=#0000ff] خانه اکسل - [url]http://excelhouse.blog.ir[/url][/COLOR][/B][/I][/SIZE]
        [/FONT][/CENTER]

        کامنت

        چند لحظه..