Vba to reorder data while preserving subscript format. Anybody please ?

Ombir

Active Member
Joined
Oct 1, 2015
Messages
433
Hi friends,

I am trying to reorder set of data which is shown below:

Input data is in Col A:

[TABLE="width: 798"]
<tbody>[TR]
[TD]1. A patient who is being mechanically ventilated has increased physiological dead space.[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]What is the most likely relationship to be present in the capilliaries that perfuse the alveoli that are part of the physiological dead space?[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]A. PAlv > PPA > PPV[/TD]
[/TR]
[TR]
[TD]B. PAlv > PPV > PPA[/TD]
[/TR]
[TR]
[TD]C. PPA > PAlv > PPV[/TD]
[/TR]
[TR]
[TD]D. PPA > PPV > PAlv[/TD]
[/TR]
[TR]
[TD]E. PPV > PAlv > PPA[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]2. Non-alcoholic fatty liver disease:[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]A. accounts for 20% of abnormal LFT's when other known causes of liver disease have been excluded[/TD]
[/TR]
[TR]
[TD]B. affects about 50% of the morbidly obese, about 20% of the obese and 3% of lean persons[/TD]
[/TR]
[TR]
[TD]C. affects obese and/or diabetic women, and has a benign outlook[/TD]
[/TR]
[TR]
[TD]D. is frequently symptomatic, with hepatomegaly in about one-quarter of cases[/TD]
[/TR]
[TR]
[TD]E. liver biopsy is the only certain way of making the diagnosis and would be usually indicated[/TD]
[/TR]
</tbody>[/TABLE]


The output structure should be as shown below:

Output Data is in Col A-G:

[TABLE="width: 1046"]
<tbody>[TR]
[TD]Qno.[/TD]
[TD]Question[/TD]
[TD]Opt1[/TD]
[TD]Opt2[/TD]
[TD]Opt3[/TD]
[TD]Opt4[/TD]
[TD]Opt5[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]A patient who is being mechanically ventilated has increased physiological dead space. What is the most likely relationship to be present in the capilliaries that perfuse the alveoli that are part of the physiological dead space?[/TD]
[TD]PAlv > PPA > PPV[/TD]
[TD]PAlv > PPV > PPA[/TD]
[TD]PPA > PAlv > PPV[/TD]
[TD]PPA > PPV > PAlv[/TD]
[TD]PPV > PAlv > PPA[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Non-alcoholic fatty liver disease:[/TD]
[TD]accounts for 20% of abnormal LFT's when other known causes of liver disease have been excluded[/TD]
[TD]affects about 50% of the morbidly obese, about 20% of the obese and 3% of lean persons[/TD]
[TD]affects obese and/or diabetic women, and has a benign outlook[/TD]
[TD]is frequently symptomatic, with hepatomegaly in about one-quarter of cases[/TD]
[TD]liver biopsy is the only certain way of making the diagnosis and would be usually indicated[/TD]
[/TR]
</tbody>[/TABLE]



Subscript format must be preserved while converting to output format. Please help with some vba code to reorder this data. Thanks.
 
Last edited:

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