worksheet 1
A B
1123
2452
3452
4456
I want to write a query to return all records from a table in sql where value in a column equals first 2 digits of cells in column1 of active speradsheet.
SELECT * FROM testtable where column1 in left(cells(a,1),2)....
Please note I am writing this macro in excel VBA
Thank you.