Avatar of Aiysha
Aiysha
Flag 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.
VBASQL

Avatar of undefined
Last Comment
Norie

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy