Transpose Query Results

doco

Active Member
Joined
May 4, 2006
Messages
262
Is there a way to have an MS Query resultset across columns instead of down rows?

I have a parameterized query that is going to return a fixed resultset of one record and I would like it to be displayed across columns insead of as a list in one column.

TIA
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi
if your query output is a constant range then add these codes

Code:
range("A5:A30").copy
Range("B1").PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
        , Transpose:=True
Change A5 to A30 to fit your range and B1 to where you want the list started. Run the macro
Ravi
 
Upvote 0
Thanks. I am aware of the paste special process just not clear on how, or what would trigger the code after the Get External Data query finished and what effect if any this would have on rows of data below. Guess I will play around with the idea some.

So this code then would be run from a _Change() event?

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top