Solved

report format indentations

Posted on 2013-11-11
2
146 Views
Last Modified: 2013-11-19
I have received a word document in format

group 1
  member 1
  member 2
  member 3
group 2
  member 1
  member 2
  memeber 3

Its proving hard to do analysis, I would like to autofilter for say all members of group 1. Is there anyway to import this data into excel so it would be like

group    members
--------------------------
1             member 1
1             member 2
1             member 3
2             member 1
2             member 2
2             member 3

I cant see how on earth to format it in this way. From what i can see the indent is 3 characters.
0
Comment
Question by:pma111
2 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 250 total points
ID: 39638734
Hi pma,

What you can do is test for the space, and then split up the cells into columns based on the spacing. The same formulas can tell you which rows are "bad" data, so you can sort based on them later and then delete them. I'll paste a sample workbook.

Copy/paste your data into excel, starting in A2.
In B2, enter the following: =IF(LEFT(A2,1)=" ",B1,A2)
In C2, enter the following: =IF(LEFT(A2,1)=" ",TRIM(A2),"#DELETE")
In D2, enter the following: =C2="#DELETE"

Then fill down B:D through the end of your data. Copy/paste values, and then sort by column D to delete the "bad" rows.

Take a look at the attachment, let me know if you have any other questions or are having trouble fitting it to your data.

Matt

EDIT: I forgot to add, you'll delete column A when you're done too, leaving only the original B:C columns (or whatever you need if your data is different)
pma-sample.xlsx
0
 
LVL 32

Assisted Solution

by:Rob Henson
Rob Henson earned 250 total points
ID: 39638739
Assuming data in A2 to A9, enter the following in an adjacent column, I have put in columnn C:

=IF(LEFT(A2,5)="Group",A2,C1)

Copy down the extent of the data.

This says "If the data is a group header use it otherwise use previous row"

This column of formulas should then be copied and pasted as values. You will then have the group header against each user. The original group header rows can then be deleted. If you want rid of the word group in this column use Edit Replace; search for "Group ", replace with "". Alternatively, this function can be written into the formula:

=IF(LEFT(A2,5)="Group",RIGHT(A2,LEN(A2)-5)*1,C1)

Thanks
Rob H


Thanks
Rob H
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My experience with Windows 10 over a one year period and suggestions for smooth operation
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now