VBA: Array Assistance (Building an Array from Formatted Cells

seafre01

New Member
Joined
Jan 6, 2015
Messages
1
Hey All,

I'm running into difficulties producing an array that will produce two separate lists based on formatting: Red - Additions , Underline - Deletions. The number of mandates and processes vary from instance to instance.

See below for a visual of my inquiry:

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Process A[/TD]
[TD]Process B[/TD]
[/TR]
[TR]
[TD]Mandate A[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]Mandate B[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 119"]
<tbody>[TR]
[TD="class: xl68, width: 119"]Applicable.
Controls: 15119, 15120, 24452, 24453, 24454[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Below (minus the labels in bold), is the ideal output I'm looking to get. Any assistance in hashing this out would be greatly appreciated! Currently my code will find any instance where the cell shows "Applicable." and list an array of all mandates processes and control #'s.

Creations
[TABLE="width: 250"]
<tbody>[TR]
[TD]Mandate A[/TD]
[TD]Process A[/TD]
[TD]15119[/TD]
[/TR]
[TR]
[TD]Mandate B[/TD]
[TD]Process A[/TD]
[TD]24452[/TD]
[/TR]
[TR]
[TD]Mandate B[/TD]
[TD]Process B[/TD]
[TD]15120[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD]Process A[/TD]
[TD]24453[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD]Process A[/TD]
[TD]24454[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD]Process B[/TD]
[TD]15119[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD]Process B[/TD]
[TD]24452[/TD]
[/TR]
</tbody>[/TABLE]

Deletions

[TABLE="width: 250"]
<tbody>[TR]
[TD]Mandate A[/TD]
[TD]Process A[/TD]
[TD]15120[/TD]
[/TR]
[TR]
[TD]Mandate A[/TD]
[TD]Process B[/TD]
[TD]15119[/TD]
[/TR]
[TR]
[TD]Mandate A[/TD]
[TD]Process B[/TD]
[TD]24453[/TD]
[/TR]
[TR]
[TD]Mandate B[/TD]
[TD]Process A[/TD]
[TD]15119[/TD]
[/TR]
[TR]
[TD]Mandate B[/TD]
[TD]Process B[/TD]
[TD]24454[/TD]
[/TR]
[TR]
[TD]Mandate C[/TD]
[TD]Process B[/TD]
[TD]15120[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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