'Replace PowerQuery SQL Statement Using VBA
Currently my spreadsheet is connected to SQL server via PowerQuery using this simple statement:
SELECT *
FROM [SALES].[dbo].[Customers]
WHERE [CUST_ID] in ('1001', '1002', '1003', '1005')
Is there any way to create a VBA command to replace ('1001', '1002', '1003', '1005') to the value contained in cell A1 in worksheet named 'Sheet1'?
The value in cell A1 worksheet 'Sheet1' is currently '5001, '5007', '5008' and I want to change the numbers in the cell rather than going into PowerQuery everytime to update it.
Thank you in advance for your help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
