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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

ravishankar

Well-known Member
Joined
Feb 23, 2006
Messages
3,566
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
 

doco

Active Member
Joined
May 4, 2006
Messages
262
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,982
Messages
5,834,686
Members
430,310
Latest member
Excelorate3305

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
Top