VBA : SQL Query results into multiple columns (columns are made up of merged cells)

dtwyford

New Member
Joined
Dec 24, 2015
Messages
14
Good day!

I am looking to retrieve data from a SQL sever then place that data in multiple columns (if required).

I have an array of cells in the workbook. There are three columns. Each column is 8 rows deep. Each column is made up of 4 merged cells (for formatting consistency).

Column 1. W57:W64 Each "Cell" is 4 cells so position 1 is actually a merge of W57-Z57.
Column 2. AB57:AB64
Column 3 AG57:AJ64

SQL statement can return from 2 to 24 values.

I want the to be able to write the record set to fill column 1 - starting at W57, then continue in column 2 - starting at AB57, etc.

Your skilled help would be appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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