मुख्य सामग्री पर जाएं

यदि कॉलम या कॉलम हेडर को एक्सेल में फ़िल्टर किया गया है तो उसे हाइलाइट कैसे करें?

लेखक: सिलुविया अंतिम संशोधित: 2021-02-22

एकाधिक कॉलम वाली तालिका के लिए, एक नज़र में यह पता लगाना आसान नहीं है कि कौन सा कॉलम फ़िल्टर किया गया है क्योंकि फ़िल्टर किए गए कॉलम के लिए एक को छोड़कर कोई स्पष्ट प्रतीक नहीं है। निशान। यदि आप किसी तालिका में फ़िल्टर किए गए कॉलम को उत्कृष्ट बनाना चाहते हैं, तो इस आलेख में एक विधि आपकी सहायता कर सकती है।

यदि कॉलम हेडर या संपूर्ण कॉलम को VBA कोड से फ़िल्टर किया गया है तो उसे हाइलाइट करें


यदि कॉलम हेडर या संपूर्ण कॉलम को VBA कोड से फ़िल्टर किया गया है तो उसे हाइलाइट करें

जैसा कि नीचे स्क्रीनशॉट में दिखाया गया है, आपको संपूर्ण कॉलम या केवल कॉलम हेडर को हाइलाइट करना होगा यदि यह कॉलम तालिका श्रेणी में फ़िल्टर किया गया है, तो कृपया निम्नलिखित वीबीए कोड लागू करें।

1। दबाएं ऑल्ट + F11 कुंजी को खोलने के लिए अनुप्रयोगों के लिए माइक्रोसॉफ्ट विज़ुअल बेसिक खिड़की.

2. एप्लिकेशन विंडो के लिए Microsoft Visual Basic में, कृपया क्लिक करें सम्मिलित करें > मॉड्यूल. फिर नीचे दिए गए VBA कोड को मॉड्यूल विंडो में कॉपी करें।

वीबीए कोड: यदि कॉलम फ़िल्टर किया गया है तो कॉलम हेडर को हाइलाइट करें

Sub HighLightTitle()
'Updated by Extendoffice 2017/9/12
    Dim xRg As Range
    Dim I As Integer
    Dim xCount As Long
    Dim xRgCol As Long
    Dim xAddress As String
    Dim xFilterCount As Long
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Please select the first cell of the table range:", "KuTools For Excel", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    xRg.Select
    With xRg(1).Parent.AutoFilter
        xFilterCount = .Range.Columns.Count
        xRgCol = xRg.Offset(1).Column - .Range.Column + 1
        For I = xRgCol To xFilterCount
            xCount = xRg.Offset(, I - xRgCol).Column - .Range.Column + 1
            With .Filters(xCount)
                If .On Then
                    xRg.Offset(, I - xRgCol).Interior.Color = 16736553
                End If
            End With
        Next
    End With
End Sub

यदि पूरे कॉलम को तालिका में फ़िल्टर किया गया है तो उसे हाइलाइट करने के लिए, कृपया नीचे दिए गए VBA कोड को कॉपी करें और मॉड्यूल विंडो में पेस्ट करें।

वीबीए कोड: यदि फ़िल्टर किया गया है तो पूरे कॉलम को हाइलाइट करें

Sub HighLightCols()
'Updated by Extendoffice 2017/9/12
    Dim xRg As Range
    Dim xCount As Long
    Dim xRgCol As Long
    Dim xAddress As String
    Dim xRgFilter As Range
    Dim xFilterCount As Long
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Please select the first cell of the table range:", "KuTools For Excel", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    xRg.Select
    With xRg(1).Parent.AutoFilter
        xFilterCount = .Range.Columns.Count
        xRgCol = xRg(1).Column - .Range.Column + 1
        For I = xRgCol To xFilterCount
            xCount = xRg.Offset(, I - xRgCol).Column - .Range.Column + 1
            With .Filters(xCount)
                Set xRgFilter = xRg.Offset(, I - xRgCol).Parent.AutoFilter.Range.Columns(xCount)
                If .On Then
                    xRgFilter.Interior.Color = 16736553
                End If
            End With
        Next
    End With
End Sub

3। दबाएं F5 कोड चलाने की कुंजी. पॉप अप में एक्सेल के लिए कुटूल संवाद बॉक्स, कृपया तालिका के पहले सेल का चयन करें जिसे आपको फ़िल्टर किए गए कॉलम हेडर या संपूर्ण फ़िल्टर किए गए कॉलम को हाइलाइट करने की आवश्यकता है, और फिर क्लिक करें OK बटन.

यदि कॉलम को किसी निश्चित तालिका में फ़िल्टर किया गया है तो कॉलम हेडर या संपूर्ण कॉलम तुरंत हाइलाइट किया जाएगा। स्क्रीनशॉट देखें:

यदि कॉलम तालिका में फ़िल्टर किया गया है तो कॉलम हेडर को हाइलाइट करें:

यदि तालिका में फ़िल्टर किया गया है तो संपूर्ण कॉलम को हाइलाइट करें:

सर्वोत्तम कार्यालय उत्पादकता उपकरण

🤖 कुटूल्स एआई सहयोगी: निम्न के आधार पर डेटा विश्लेषण में क्रांति लाएं: बुद्धिमान निष्पादन   |  कोड जनरेट करें  |  कस्टम फ़ॉर्मूले बनाएं  |  डेटा का विश्लेषण करें और चार्ट बनाएं  |  कुटूल फ़ंक्शंस का आह्वान करें...
लोकप्रिय सुविधाएँ: डुप्लिकेट ढूंढें, हाइलाइट करें या पहचानें   |  रिक्त पंक्तियाँ हटाएँ   |  डेटा खोए बिना कॉलम या सेल को संयोजित करें   |   फॉर्मूला के बिना गोल ...
सुपर लुकअप: एकाधिक मानदंड VLookup    मल्टीपल वैल्यू वीलुकअप  |   अनेक शीटों में VLookup   |   फजी लुकअप ....
उन्नत ड्रॉप-डाउन सूची: शीघ्रता से ड्रॉप डाउन सूची बनाएं   |  आश्रित ड्रॉप डाउन सूची   |  बहु-चयन ड्रॉप डाउन सूची ....
स्तम्भ प्रबंधक: कॉलमों की एक विशिष्ट संख्या जोड़ें  |  कॉलम ले जाएँ  |  छिपे हुए कॉलम की दृश्यता स्थिति टॉगल करें  |  रेंज और कॉलम की तुलना करें ...
फीचर्ड फीचर्स: ग्रिड फोकस   |  डिजाइन देखें   |   बड़ा फॉर्मूला बार    कार्यपुस्तिका एवं शीट प्रबंधक   |  संसाधन लाइब्रेरी (ऑटो टेक्स्ट)   |  खजूर बीनने वाला   |  कार्यपत्रकों को संयोजित करें   |  एन्क्रिप्ट/डिक्रिप्ट सेल    सूची के अनुसार ईमेल भेजें   |  सुपर फ़िल्टर   |   विशेष फ़िल्टर (फ़िल्टर बोल्ड/इटैलिक/स्ट्राइकथ्रू...) ...
शीर्ष 15 टूलसेट12 टेक्स्ट टूल्स (पाठ जोड़ें, अक्षर हटाएँ, ...)   |   50 + चार्ट प्रकार (गैन्ट चार्ट, ...)   |   40+ प्रैक्टिकल सूत्र (जन्मदिन के आधार पर आयु की गणना करें, ...)   |   19 निवेशन टूल्स (QR कोड डालें, पथ से चित्र सम्मिलित करें, ...)   |   12 रूपांतरण टूल्स (शब्दों को संख्याएँ, मुद्रा रूपांतरण, ...)   |   7 विलय और विभाजन टूल्स (उन्नत संयोजन पंक्तियाँ, विभाजन कोशिकाओं, ...)   |   ... और अधिक

एक्सेल के लिए कुटूल के साथ अपने एक्सेल कौशल को सुपरचार्ज करें, और पहले जैसी दक्षता का अनुभव करें। एक्सेल के लिए कुटूल उत्पादकता बढ़ाने और समय बचाने के लिए 300 से अधिक उन्नत सुविधाएँ प्रदान करता है।  वह सुविधा प्राप्त करने के लिए यहां क्लिक करें जिसकी आपको सबसे अधिक आवश्यकता है...

Description


ऑफिस टैब ऑफिस में टैब्ड इंटरफ़ेस लाता है, और आपके काम को बहुत आसान बनाता है

  • Word, Excel, PowerPoint में टैब्ड संपादन और रीडिंग सक्षम करें, प्रकाशक, एक्सेस, विसियो और प्रोजेक्ट।
  • नई विंडो के बजाय एक ही विंडो के नए टैब में एकाधिक दस्तावेज़ खोलें और बनाएं।
  • आपकी उत्पादकता 50% बढ़ जाती है, और आपके लिए हर दिन सैकड़ों माउस क्लिक कम हो जाते हैं!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
solution that can help create updated vba is TO add additional duplicate first raw in row A1, Row A2 should be the beginning of the filtered data ( exact duplicate of all data in Row A1 - Row A1 and A2 should me same ), so we always have one header line without filter drop down icon and with OG format, once the macro is ran with few columns filtered it will highlight the filtered column as usual and after removing the desired columns filter or all columns filter it should copy the format in A1 Column, for the columns with no filtered sorting can this be done ?
This comment was minimized by the moderator on the site
this would be fantastic for me, but I couldn't make it work. I used the code to color the whole column. when I filtered the first time, the column turned blue. however when I cleared the filter, the blue remained. Afterwards, filtering another column had no effect. so at the moment I am left with one blue column. using latest Excel of Office 365.
This comment was minimized by the moderator on the site
I had the same issue. Once the column is unfiltered. The column remained blue. Also, when do you filter a new column, it's unchanged. The vba doesn't make it highlighted in the new filter column.
This comment was minimized by the moderator on the site
Hi,
Thank you for your comment.
The problem you mentioned is too complicated to acheive now. We will try our best to solve it as soon as possible and let you know after we figure it out.
This comment was minimized by the moderator on the site
To Correct this, change:
If .On Then

xRg.Offset(, I - xRgCol).Interior.Color = 16736553

End If

To:
If .On Then

xRg.Offset(, I - xRgCol).Interior.Color = 16736553

Else

xRg.Offset(, I - xRgCol).Interior.Color = 16777215

End If



Not it will remove the color.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations