- In Microsoft Excel, click a cell anywhere in the external data range created with a parameter query.
- On the External Data toolbar, click Query Parameters .
- In the list on the left side of the Parameters dialog box, click the parameter that you want to change.
- In the Prompt for value using the following string box, type the text that you want to use for the prompt, and then click OK. The custom prompt can contain up to 100 characters.
- To use the new custom prompt and refresh the data, click Refresh Data on the External Data toolbar.
Note This procedure changes the custom prompt only for the current session of the workbook. If you want to permanently save your changes to the custom prompt, save the workbook or change the prompt for the query in Microsoft Query. For more information about changing a query, see Microsoft Query Help.
Use data from a cell as a parameter value
- On your worksheet, type the values you want to use as criteria in the query.
- Click a cell anywhere in the external data range created with a parameter query.
- On the External Data toolbar, click Query Parameters .
- In the list on the left side of the Parameters dialog box, click the parameter you want to change.
- Click Get the value from the following cell.
- On the worksheet, click the cell that contains the value you want to use.
If you want to refresh the data whenever you change the value in the cell, select the Refresh automatically when cell value changes check box.
- Click OK.
- To refresh the data, click Refresh Data on the External Data toolbar.
Use a constant parameter value for a query
- In Excel, click a cell in the external data range created with a parameter query.
- On the External Data toolbar, click Query Parameters .
- In the list on the left side of the Parameters dialog box, click the parameter you want to change.
- Click Use the following value.
- Type the value you want to use for the parameter, and then click OK.
- To refresh the data, click Refresh Data on the External Data toolbar.