sree161 Posted July 18, 2019 Posted July 18, 2019 Hi, i have an excel with data from A to MX. I have to apply filter for all rows and filter N to specific term say "Yes" and take count of number of rows in that filter. Later i have to remove that filter. I am not sure where to add that "Yes" term in Excel_FilterSet ( $oWorkbook, $vWorksheet, $vRange, $iField [, $sCriteria1 = Default [, $iOperator = Default [, $sCriteria2 = Default]]] ) Any suggestions and ideas??
Nine Posted July 18, 2019 Posted July 18, 2019 _Excel_FilterSet($oWorkbook, Default, "I1:I10", 1, "Yes") “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
sree161 Posted July 19, 2019 Author Posted July 19, 2019 How can i get the column count post filtering?? Post filtering i have to remove filter.
Nine Posted July 20, 2019 Posted July 20, 2019 I am not sure you are taking the right path if you intend just to get a count. Filter is used normally to show a different view of the data, not to simplify count or other math operations. Since we do not know exactly what you want to achieve, I would suggest this : Local $aSelect = _Excel_RangeFind ($oWorkbook, "Yes", "I1:I99") _ArrayDisplay ($aSelect) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
sree161 Posted July 20, 2019 Author Posted July 20, 2019 Hi , i have tried this, $oRange = $oExcel.ActiveSheet.Range("A:A") MsgBox(4096, "Excel Count Non-Blank Cells", $oExcel.WorksheetFunction.CountA($oRange)) Now i am getting total count of columns..but not filtered ones.. Will any edit in this help?
Subz Posted July 20, 2019 Posted July 20, 2019 Try: $oExcel.WorksheetFunction.CountIf($oWorkbook.ActiveSheet.Range("N:N"), "Yes")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now