Tidying up data in Excel...

raston_89

New Member
Joined
Mar 24, 2014
Messages
3
Hi,

I have a complex problem. I have a heap of data in excel that has a lot of crap in between, below is an example. It lists a Job Number (i.e A1), then a heap of crap I don't care about until it gets to the data blocks that each have the heading "REPORT" with a few rows of data for that particular job number below them. After a few REPORT blocks (which all have a one row space between them), there is some more crap, then the next Job number (A29), and the series repeats.

I want to run a formula down column B that looks to the cell on its left (in column A) and returns the values in that cell only if it is the Job number, the heading REPORT or the important data underneath Report. Below is an example of what the data looks like, and then what I want it to look like.

I have tried to think up of a way but am just getting stuck... Any help would be great!! :)



WHAT DATA LOOKS LIKE:
a
1Job 1000
2Irrelevant Data
3Irrelevant Data
4
5REPORT
6Important Data
7Important Data
8Important Data
9
10REPORT
11Important Data
12Important Data
13Important Data
14Important Data
15Important Data
16
17REPORT
18Important Data
19Important Data
20Important Data
21Important Data
22
23Irrelevant Data
24Irrelevant Data
25Irrelevant Data
26
27Irrelevant Data
28
29Job 1001
30Irrelevant Data
31Irrelevant Data
32
33REPORT
34Important Data
35Important Data
36Important Data
37Important Data
38
39Job 1002
40Irrelevant Data
41Irrelevant Data
42
43REPORT
44Important Data
45Important Data
46Important Data

<colgroup><col><col></colgroup><tbody>
</tbody>


WHAT I WANT DATA TO LOOK LIKE:

ab
1Job 1000Job 1000
2Irrelevant Data
3Irrelevant Data
4
5REPORTREPORT
6Important DataImportant Data
7Important DataImportant Data
8Important DataImportant Data
9
10REPORTREPORT
11Important DataImportant Data
12Important DataImportant Data
13Important DataImportant Data
14Important DataImportant Data
15Important DataImportant Data
16
17REPORTREPORT
18Important DataImportant Data
19Important DataImportant Data
20Important DataImportant Data
21Important DataImportant Data
22
23Irrelevant Data
24Irrelevant Data
25Irrelevant Data
26
27Irrelevant Data
28
29Job 1001Job 1001
30Irrelevant Data
31Irrelevant Data
32
33REPORTREPORT
34Important DataImportant Data
35Important DataImportant Data
36Important DataImportant Data
37Important DataImportant Data
38
39Job 1002Job 1002
40Irrelevant Data
41Irrelevant Data
42
43REPORTREPORT
44Important DataImportant Data
45Important DataImportant Data
46Important DataImportant Data

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Start your data in row 2 instead of row 1, and enter this formula in cell B2 and copy down:
=IF(OR(LEFT(A2,3)="Job",A2="REPORT"),A2,IF(OR(LEFT(B1,3)="Job",B1="",A2=""),"",A2))
 
Upvote 0

Forum statistics

Threads
1,215,800
Messages
6,126,980
Members
449,351
Latest member
Sylvine

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