Dear Luke M,
I have uploaded the sample file and got an error message.
I'm not sure whether it has been uploaded as I don't know how to check.
Could you please help.
Many thanks.
Thanks for your prompt reply Luke M.
I am uploading a sample file to illustrate what I trying to do.
I want to have the same number of employees even if multiple periods are selected.
Thanks.
Best Regards,
Salim.
Hi,
I have a Excel list for Sales data with 1 record per salesman/period.
I have created a pivot table in compact form from that list where in the Report Filter section, I have the period (year/month). In the Row Labels section, I have Cluster/Dept/Salesman. In the Values section, I want to...
Hi All,
Finally I've inspired myself with what jeffreyweir has suggested. Instead of Stored procedure, I replace the whole SQL text using the following:
With ActiveWorkbook.Connections("MYSERVER").ODBCConnection
.CommandText = "The SQL Command"
End With...
Narayan,
Many thanks for the link. Unfortunately, I really don't understand anything that is written there. I do have some basics of programming, but this one is too difficult for me to understand.
I will try the view option. What I'm scared is that there are many records in the...
Oops ! I will have to find another way to deal with this issue.
May be through VBA that I have never used before; I am not a programmer.
Any help will be much appreciated.
Hi Colin,
I have already tried the square brackets as well as referencing the parameter in a cell.
I still get the error message. For info, the ? works fine in a direct WHERE clause. The problem is in subquery.
Hi Narayan,
Thanks for your quick reply, but I don't really understand your question.
I don't need "_" or "%". I just want to prompt the user to enter his usercode and pass the code to the query.
Hi All,
I have a worksheet where I "Get External Data" from SQL Server via MS Query.
I have the following SQL statement :
SELECT *
FROM TransactionFile
WHERE Dept IN (SELECT Dept FROM UserDeptFile WHERE UserCode = 'UserCode')
It works fine.
However, when I replace the 'UserCode' with...