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

एक्सेल में फ़िल्टर करने के बाद पहली दृश्यमान सेल का मूल्य कैसे खोजें और प्राप्त करें?

लेखक: सिलुविया अंतिम संशोधित: 2020-06-17

कुछ मामलों में, आपको फ़िल्टर की गई सूची में पहली दृश्यमान सेल का मान प्राप्त करने की आवश्यकता हो सकती है। उसकी प्राप्ति कैसे हो? यह लेख आपको इसे हल करने के तरीके दिखाएगा।

सरणी सूत्र के साथ फ़िल्टर करने के बाद पहले दृश्यमान सेल का मान ढूंढें और प्राप्त करें
VBA के साथ फ़िल्टर करने के बाद पहली दृश्यमान सेल का मान ढूंढें और प्राप्त करें


सरणी सूत्र के साथ फ़िल्टर करने के बाद पहले दृश्यमान सेल का मान ढूंढें और प्राप्त करें

फ़िल्टर की गई सूची में पहली दृश्यमान सेल का मान प्राप्त करने के लिए आप निम्नलिखित सरणी सूत्र लागू कर सकते हैं। कृपया निम्नानुसार करें.

1. पहला दृश्यमान मान रखने के लिए एक रिक्त कक्ष का चयन करें, उसमें नीचे दिया गया सूत्र दर्ज करें, और फिर दबाएँ कंट्रोल + पाली + दर्ज एक साथ चाबियाँ।

=INDEX(C2:C19,MIN(IF(SUBTOTAL(3,OFFSET(C2,ROW(C2:C19)-ROW(C2),0)),ROW(C2:C19)-ROW(C2)+1)))

नोट: सूत्र में, C2:C19 फ़िल्टर की गई सूची है जिसे आप पहला दृश्यमान सेल मान वापस करना चाहते हैं, C2 सूची का पहला सेल है। आप आवश्यकतानुसार उन्हें बदल सकते हैं।

फिर आप ऊपर दिखाए गए स्क्रीनशॉट के अनुसार चयनित सेल में पॉप्युलेट की गई फ़िल्टर की गई सूची में पहले दृश्यमान सेल का मान देख सकते हैं।


VBA के साथ फ़िल्टर करने के बाद पहली दृश्यमान सेल का मान ढूंढें और प्राप्त करें

फ़िल्टर की गई सूची में पहली दृश्यमान सेल का मान प्राप्त करने के लिए उपरोक्त सरणी सूत्र का उपयोग करने के अलावा, आप फ़िल्टर की गई सूची की पहली दृश्यमान सेल को तुरंत वापस करने के लिए नीचे दी गई VBA स्क्रिप्ट चला सकते हैं। कृपया निम्नानुसार करें.

1. फ़िल्टर की गई सूची के पहले दृश्यमान सेल मान को रखने के लिए E8 जैसे रिक्त सेल का चयन करें।

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

3। में अनुप्रयोगों के लिए माइक्रोसॉफ्ट विज़ुअल बेसिक खिड़की, क्लिक करें सम्मिलित करें > मॉड्यूल. फिर नीचे दिए गए VBA कोड को कॉपी करके मॉड्यूल विंडो में पेस्ट करें।

वीबीए कोड: एक्सेल में फ़िल्टर करने के बाद पहली दृश्यमान सेल का मान ढूंढें और प्राप्त करें

Sub FirstVisibleCell()
   With Worksheets("Sheet1").AutoFilter.Range
       ActiveCell.Value2 = Range("C" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Value2
    End With
End Sub

नोट: कोड में, शीट1 शीट का नाम है जिसमें फ़िल्टर की गई सूची शामिल है। "सी" वह कॉलम नाम है जिससे आप पहला दृश्य मान प्राप्त करना चाहते हैं। आप आवश्यकतानुसार उन्हें बदल सकते हैं।

3। दबाएं F5 कोड को चलाने के लिए कुंजी, फिर फ़िल्टर की गई सूची का पहला दृश्य सेल जो कॉलम सी में स्थित है, तुरंत सेल ई8 में पॉप्युलेट हो जाएगा।

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

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

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

Description


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

  • Word, Excel, PowerPoint में टैब्ड संपादन और रीडिंग सक्षम करें, प्रकाशक, एक्सेस, विसियो और प्रोजेक्ट।
  • नई विंडो के बजाय एक ही विंडो के नए टैब में एकाधिक दस्तावेज़ खोलें और बनाएं।
  • आपकी उत्पादकता 50% बढ़ जाती है, और आपके लिए हर दिन सैकड़ों माउस क्लिक कम हो जाते हैं!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks a lot, that formula INDEX(C2:C19,MIN(IF(SUBTOTAL(3,OFFSET(C2,ROW(C2:C19)-ROW(C2),0)),ROW(C2:C19)-ROW(C2)+1))) literally save my soul.
Even though I still do not get how the formula works, it does provide the return that I would like to have.

Regards,
Vedat
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
In the following VBA code, can you please explain what does SpecialCells(xlCellTypeVisible)(1) mean? What is (1) used for after SpecialCells(xlCellTypeVisible)?
ActiveCell.Value2 = Range("C" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Value2
This comment was minimized by the moderator on the site
Can you help me write this formula in google sheet with arrayformula ()

{=INDEX(C2:C19,MIN(IF(SUBTOTAL(3,OFFSET(C2,ROW(C2:C19)-ROW(C2),0)),ROW(C2:C19)-ROW(C2)+1)))}
This comment was minimized by the moderator on the site
So for me the answer above simply does't work that well. I have a workbook with over 23k rows and is something I've been working to optimize over the years. My solution came to me this morning in yet another spark of inspiration.
Assuming that you are using a TABLE to get the data you want do this:One row (I named it "Rownmbr") is dedicated to: =CELL([@[YOURFIRSTROW]])
Outside the table you make a formula somewhere:=INDIRECT(CONCATENATE("A";SUBTOTAL(105;Table1[Rownmbr])))
You simply replace the "A" with wherever you want to get the data from. For me this works great, and it's not a heavy formula to use that will bog down the document further.
This comment was minimized by the moderator on the site
This solution worked perfectly for me, since I was using a table. The instructions were hard to follow, so hopefully this explanation will be a bit clearer.
Say you have an excel table named "Table_Name."  First, create a new column in your table and name it "RowNumber". 
In that new column, enter the formula "=ROW([@RowNumber])" This will then populate the new column with
In the cell where you want to display the first visible value, enter the formula "=INDIRECT("A"&SUBTOTAL(105,Table_Name[RowNumber]))"  The "A" is the letter of the column that holds the value you want to return.
The SUBTOTAL(105,...) function returns the minimum value of all the visible rows in a given range, which in the case above will return the row number of the first visible row.
The INDIRECT function returns the value of the cell for a given cell address. This is why you need the first part of the formula to contain the column letter of the column you want to display. The second part of the formula will return the row number.


This comment was minimized by the moderator on the site
This formula works, but be aware that if you have blank cells, the formula can malfunction and select the first value in the entire table, not just in the filtered results. The workaround I found was to replace blank cells with NULL or a space.
This comment was minimized by the moderator on the site
First I had blanks.... then all cells were filled but still having the #VALUE response. Hopefully this formula works on text as well...! Thanks for the advise anyway ;-)
This comment was minimized by the moderator on the site
It works. Thanks so much...
This comment was minimized by the moderator on the site
Thanks a million🙏🌺
This comment was minimized by the moderator on the site
‌wonderful🌺 Thanks a million🙏
This comment was minimized by the moderator on the site
I keep getting a Run-time error '91' Object variable or With block variable not set. My worksheet is Sheet1 titled AllBrands. This is my formula :

Sub FirstVisibleCell()
With Worksheets("ALLBRANDS").AutoFilter.Range
ActiveCell.Value2 = Range("H" & .Offset(1, 0).SpecialCells(xlCellTypeVisible)(1).Row).Value2
End With

End Sub

Any help will be appreciated!
This comment was minimized by the moderator on the site
Unfortunately - neither the formula - that gives me a #VALUE error nor the VBA works for me giving me a run-time error '1004'
Too bad as I have Office 2019 and I was expecting one of these features to work when filtering specific cells... :-(
This comment was minimized by the moderator on the site
Hi Bub,
The code works well in my case. Which Excel version are you using?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations