Micro Focus QTP (UFT) Forums
Filter multiple columns in excel - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Filter multiple columns in excel (/Thread-Filter-multiple-columns-in-excel)



Filter multiple columns in excel - kamalteja - 07-08-2013

Hi,
I want to filter multiple values of a particular column, i'm able to do only for one column
Ex:
Code:
Value1 = "Hello"
Value2 = "World"
ExcelSheets1.Range("J1").AutoFilter 10, V1, 2, V2
In the above line of code, I need to V1 and V2 during runtime which could be more, when i'm trying to concatenate V1,2,V2 and put as a string it is not working, the 2 should be considered as numeric value to act as "Or" operator but instead it is considered as string

The condition in the excel filter looks like "Hello,2,World" as one string and no records are fetched