Data extraction from complex database

OldStudent

New Member
Joined
Mar 23, 2016
Messages
2
Given the following snippet of a database:

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]sample #[/TD]
[TD]XDAT[/TD]
[TD]Horiz[/TD]
[TD]dy[/TD]
[TD]#[/TD]
[TD]max dy[/TD]
[/TR]
[TR]
[TD]1446[/TD]
[TD]211[/TD]
[TD]201.2[/TD]
[TD]98[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1447[/TD]
[TD]211[/TD]
[TD]202.2[/TD]
[TD]68[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1448[/TD]
[TD]211[/TD]
[TD]203.0[/TD]
[TD]50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1614[/TD]
[TD]200[/TD]
[TD]135[/TD]
[TD]40[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1615[/TD]
[TD]200[/TD]
[TD]136[/TD]
[TD]45[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1616[/TD]
[TD]200[/TD]
[TD]130[/TD]
[TD]35[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I would like to automatically fill in the "#" and "max dy" columns as follows:

Filled in part of previous snippet as desired:

[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]#[/TD]
[TD]Max dy[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]98[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

1 - the # value should stay until any of the following conditions is met:
a) XDAT value changes
b) Sample # is not sequential
c) 36 columns have been given same number (it should then increase by 1)

I would then like to create a table of the "Max dy" - one for each 'set' as defined above. There are four different XDAT possible values.

Note - the reason the sample #'s miss values (intentional) is that the columns have been filtered.

Thank you in advance for your help. This is a great assistance on a very important project.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Similar threads

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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