Avatar of printmedia
printmedia

asked on 

Use excel query parameters to also be column header

Hi all.

I have an excel 2007 file whose data source is a sql table. When the user opens the file it asks them for 2 parameters how can have the 2 parameters the user enters appear as a column header using vba?

Thank you in advance!
Microsoft Excel

Avatar of undefined
Last Comment
Rory Archibald
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS 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
Avatar of printmedia
printmedia

ASKER

Thanks for the reply. Currently, when the file is opened by the user it prompts the user for the 2 parameters.

So what you're suggesting is that I put the parameters in a cell?
Yes. If you right-click the table, choose  Table-Parameters... you should be able to choose cells as the input ranges and also specify that the table should update automatically if their values are changed.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo