Solved

report format indentations

Posted on 2013-11-11
2
156 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Msbbox Notice (4 days) 27 59
formatting - number format 2 14
ProperCase in Excel (Sheet) 3 16
Need to get a Word Count from a Word file 19 21
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

832 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