Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

select rows in access from excel vba

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.
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial