Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

report format indentations

Posted on 2013-11-11
2
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 1000 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 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

660 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