Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

You can customize a Microsoft Query parameter query by changing the prompt, by using data from a cell as the prompt, or by using a constant.

For more information about creating parameter queries, see Use Microsoft Query to retrieve external data.

Note: The following procedures do not apply to queries created by using Power Query.

Change the custom prompt for a parameter query

  1. On your worksheet, click a cell anywhere in the external data range that was created using the parameter query.

  2. On the Data tab, in the Queries & Connections group, click Properties.

  3. In the Properties dialog box, click Connection Properties Button image.

  4. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  5. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  6. 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.

  7. To use the new custom prompt and refresh the data, click the arrow next to Refresh All on the Data tab, in the Queries & Connections group, and then click Refresh.

  8. In the Enter Parameter Value dialog box, the new prompt is displayed.

    Note: Optionally, to prevent being prompted again during each refresh operation, you can select the Use this value/reference for future refreshes check box. If you use data from a cell as the parameter value, select the Refresh automatically when cell value changes check box.

  1. On your worksheet, type the values that you want to use as criteria in the query.

  2. Click a cell anywhere in the external data range that was created with the query.

  3. On the Data tab, in the Queries & Connections group, click Properties.

  4. In the Properties dialog box, click Connection Properties Button image.

  5. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  6. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  7. Click Get the value from the following cell.

  8. On the worksheet, click the cell that contains the value that 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.

  9. Click OK.

  10. To refresh the data, click the arrow next to Refresh All on the Data tab, in the Queries & Connections group, and then click Refresh.

  1. On your worksheet, click a cell in the external data range that was created with the query.

  2. On the Data tab, in the Queries & Connections group, click Properties.

  3. In the Properties dialog box, click Connection Properties Button image.

  4. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  5. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  6. Click Use the following value.

  7. Type the value that you want to use for the parameter, and then click OK.

  8. To refresh the data, click the arrow next to Refresh All on the Data tab, in the Queries & Connections group, and then click Refresh.

Change the custom prompt for a parameter query

  1. On your worksheet, click a cell anywhere in the external data range that was created with the parameter query.

  2. On the Data tab, in the Connections group, click Properties.

  3. In the Properties dialog box, click Connection Properties Button image.

  4. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  5. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  6. 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.

  7. To use the new custom prompt and refresh the data, click the arrow next to Refresh All on the Data tab, in the Connections group. Then click Refresh.

  8. In the Enter Parameter Value dialog box, the new prompt is displayed.

    Note: Optionally, to prevent being prompted again during each refresh operation, you can select the Use this value/reference for future refreshes check box. If you use data from a cell as the parameter value, select the Refresh automatically when cell value changes check box.

Note: If you want to save your changes to the custom prompt, save the workbook. You can also edit the query to change the prompt. For more information about editing a Microsoft Query query, see Microsoft Query Help.

  1. On your worksheet, type the values that you want to use as criteria in the query.

  2. Click a cell anywhere in the external data range that was created with the parameter query.

  3. On the Data tab, in the Connections group, click Properties.

  4. In the Properties dialog box, click Connection Properties Button image.

  5. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  6. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  7. Click Get the value from the following cell.

  8. On your worksheet, click the cell that contains the value that 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.

  9. Click OK.

  10. To refresh the data, click the arrow next to Refresh All on the Data tab, in the Connections group, and then click Refresh.

  1. In Excel, click a cell in the external data range that was created with a parameter query.

  2. On the Data tab, in the Connections group, click Properties.

  3. In the Properties dialog box, click Connection Properties Button image.

  4. In the Connection Properties dialog box, click the Definition tab, and then click Parameters.

  5. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change.

  6. Click Use the following value.

  7. Type the value that you want to use for the parameter, and then click OK.

  8. To refresh the data, click the arrow next to Refresh All on the Data tab, in the Connections group, and then click Refresh.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×