Search Excel for headers and reorganize output

butch3

Board Regular
Joined
Feb 4, 2019
Messages
54
I have an interesting challenge that I need help with the macro code to reorganize the output.

Essentially, I need a report to output items of data on one row but the output currently is on multiple rows and they won't change the output for me.

Unfortunately, I can't download the XL2BB but I am posting input and output pictures and the text for copy and paste. Also, the cells where the data is located in the input image are just an example. The actual cells can potentially be located anywhere in the document. The end of the document is where there are 10 empty rows?

The challenge is that some of the headers have text on 2 separate lines (See A44 and A45 of the input picture for an example). Also, the other challenge is that each row of the output will have to have the result of whatever is after the "CS:" until the next one appears in the report input (see A43 and A58 input picture for an example).

Except for the colors that I added, the input report looks the way it does because I 'select all' cells and 'clear format' to remove any merge of the document.

Input Image:

Input.png


Output Image:
1. Output should be placed in new tab
2. color coding is not necessary.
3. columns that are the width of the longest text is preferred - no more though
4. dates should be converted to date format and where amounts are (rather than numbers) should be in dollar format

Output.png



Text:

Plan
No.
220632

CSPlan No.ComponentC NumberProject TitleEstimated AmountType of ActionS Released DatePlanned DateProject ManagerProject Officer / Ph. #RNumTypeRFC Due DateRFC Rcvd DateR Rcvd. DateC AmountStatus/Remarks
B220625GHICN/ANew Project
12345​
New
44813​
MeAnother Name
123​
---
44751​
Exercise
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Sample Input text throughout document:

CS: B
PlanComponentC NumberProjectEstimatedType ofSPlannedProjectProject Officer /
No.TitleAmountActionReleased DateDateManagerPh. #
220625GHICN/ANew Project
12345​
New
44813​
MeAnother Name
RNumTypeRFC Due DateRFC Rcvd DateR Rcvd. DateC Amount
123​
---
44751​
Status/Remarks:Exercise
Total R for 220625: 0
CS: A
PlanComponentC NumberProjectEstimatedType ofSPlannedProjectProject Officer /
No.TitleAmountActionReleased DateDateManagerPh. #
220625GHICN/ANew Project
12345​
New
44813​
MeAnother Name
RNumTypeRFC Due DateRFC Rcvd DateR Rcvd. DateC Amount
324​
---
44751​
Status/Remarks:Exercise
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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