Microsoft
Software
Hardware
Network
Question : Get data from a table into individual rows. Excel macro, VBA
Hi,
I got some great help off here before and I’m hoping that somebody can help again.
I have one workbook with two worksheets, a ‘DataSheet’ and a ‘Control Sheet’, I have attached a workbook to demonstrate what I want to get to.
I am wanting a macro which will populate the control sheet with data from the datasheet but I’m not sure how to do it:
The result I want is quite simple, the data is in a table with Product going down the rows and names going across the columns and data in the centre.
I am wanting to list this table as a series of rows so on the example attached,
Product A – Name B – 10
Product A – Name C – 20
Etc
Etc
On the control sheet is the output I am wanting to get to, however if the row or column have a ’skip’ next to it (row) or above it (column) I do not want to include that data, I have noted this as red text on my example.
There are going to be about 40 columns of data and about 300 rows (static numbers once confirmed) but not sure how to go about it to get the best speed as it will produce around 12,000 rows.
I am restricted to using Excel for this so cannot look at an Access route.
Thanks :-)
Attachments:
ExampleWorkbook.xls
(28 KB)
(File Type Details)
Example Workbook
Related Solutions:
Add new columns into array. VBA Excel
Answer : Get data from a table into individual rows. Excel macro, VBA
At the bottom, replace
Sheets(2).Range("F6").Resi
ze(rows.Co
unt * cols.Count, 3) = PasteArray
with wherever you want to put the result, e.g.
Sheets("Control Sheet").Range("A1").Resize
(rows.Coun
t * cols.Count, 3) = PasteArray
Random Solutions
How to run app on local machine and display results in web page
json string
FAXCOOLWAREZ037 192.168.1.38 00-1A-73-C3-39-8A
Trying to connect to the server using Microsoft SQL Server Management Studio
ASA 5505 DMZ won't Access Internet
Vista - "Open With" Not Allowing An Associated Program To Be Selected By Browsing
Named anchor tags in IE
Remote connectivity to Microsoft OCS 2007 R2 Fails
Copying the shade of diagram into a table cell
Group Policy settings for BitLocker startup options are in conflict