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
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,190
Messages
5,594,761
Members
413,931
Latest member
acrato

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