Macro to fill tables that have changing number of rows

haganator

New Member
Joined
Aug 5, 2008
Messages
42
Greetings everyone,

I'm trying to write a macro that will read data from one spreadsheet and graph it in another when the number of rows is variable. The data consists of 8 tables. Each table will have a maximum of 24 rows. The number of columns are different for each table, but they don't change. I have a macro that will populate my tables correctly when there is a full days' worth of data (24 rows)...I can hard code the size of each table. What I'm trying to do is write a macro that will populate my tables if there's only a partial days' worth of data. Each table has a title and a header. The header could be 2-4 rows. I initially thought of searching for the table title and then using an offset command to get to the first row, but I couldn't figure out how to make that work. Any ideas would be greatly appreciated. Below is a clip of 2 of the tables showing 14 hours of data

Many thanks in advance,
Jeff

PCSS0-Session-Stats
RPP0RPP1RPP4RPP5
HourADADADAD
03979204401929239290093899324
13518559330861032984253288685
23318153317814731479853108290
33197901299792433178573187966
43517880333792832977143207906
53758379408848139582983858565
64679250462949447692184699576
759210405602104896131018057910688
868911212672114476801089467711203
973811427728117797231112773911633
1074911453747119847651145674911833
1174411749752121947201153079312154
1275411969749122226951173272812387
1375611908774122057591185673412569
PCSS0-CPU-Stats
HourPMPRPP0RPP1RPP4RPP5PEP0PEP1PMPRPP0RPP1RPP4RPP5PEP0PEP1
PKPKPKPKPKPKPKAVAVAVAVAVAVAV
0179888438666632
1177777437555533
2166666437555533
3166666437555533
4176667437555533
5167887557666633
6179999438777733
71712121112438999933
818141413134381111101133
918151514154391212121233
1017151515154391213121332
1118151514164391213121333
1218151514154391313121333
1317151515154391213121233

<colgroup><col span="15"></colgroup><tbody>
</tbody>
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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