0

We have different connections and different pivot tables connected to them in our Excel sheet and we don't want to edit them each time using data-> properties-> definitions (editing) to get them updated.

enter image description here

It would be much greater if we had just cells to edit

For example:

enter image description here

And write someting like this:

enter image description here

In my case i get an error of course but maybe you know how avoid it?

Maksym Moroz
  • 306
  • 2
  • 14
  • 1
    Have you tested this with your work? What was the outcome? Knowing "if this works" seems ideal for a personal test. If you have an error, [please edit your post](https://stackoverflow.com/posts/58506736/edit) to include the error. Will flag as `Too Broad` in the interim, as numerous ways could exist for this, which is out of scope for this forum, intended for specific, objective answers to questions. – Cyril Oct 22 '19 at 14:39
  • @Cyril Have the question become more clear to you? – Maksym Moroz Oct 22 '19 at 14:56
  • 2
    The following should help, probably from Step 11 onward: [Parameter Query](https://stackoverflow.com/a/26443279/8670372) – Xabier Oct 22 '19 at 14:56
  • @Xabier Did you face the similiar problem as i? – Maksym Moroz Oct 22 '19 at 14:59
  • @MaksymMoroz Of course, we all face problems and find solutions,... It's not that difficult, change the definition of your SQL to have a ? instead of a value and when you click OK on the dialog box, it will prompt you to select the Cell that will hold the variable value,... – Xabier Oct 22 '19 at 15:01
  • @Xabier [Parameter Query](https://stackoverflow.com/questions/26413092/how-to-use-parameterized-query-in-excel-using-column-as-parameter/26443279#26443279) here they use Database query but in my case i have OLE DB query and the Parameters... button is disabled for me – Maksym Moroz Oct 23 '19 at 07:40
  • @Xabier I got an error if i write `declare @PrevDate as datetime = ?` – Maksym Moroz Oct 23 '19 at 07:49
  • [link](https://stackoverflow.com/a/10508283/10595361) this link tells that we may use only vba to cope with my problem but that code of vba is too complicated for understanding to customize it for me – Maksym Moroz Oct 23 '19 at 08:22
  • [Excel VBA pass parameter to OLEDBConnection](https://stackoverflow.com/questions/50722443/excel-vba-pass-parameter-to-oledbconnection) Helped me to solve the problem – Maksym Moroz Oct 25 '19 at 12:51

0 Answers0