Solved

Newby question - Search Excel sheet and delete undesired lines

Posted on 2013-01-31
8
192 Views
Last Modified: 2013-06-25
Hi!

I am going over a very big excel file, and I want to summerise subjects.


I want to go over a specific column of the the whole sheet, and delete all lines which do not include a specific string (say "Brg").
How can I do it ?
I want to go over a specific column of the the whole sheet, and delete all lines which do not include one of X strings.
Example :  I want to delete all lines which do not include one of the following strings : {"Str_1", "Str_2", "String3", "Str4"}.
How can I do it ?
I want to go over a specific column of the the whole sheet, and delete all lines which do not include one of X strings (but do not delete lines which the cell is Empty).
Example :  I am going over column J, and I want to delete all lines which do not include one of the following strings : {"Str_1", "Str_2", "String3", "Str4"}, BUT I do not want to delete lines in which the "J cell" is empty.
How can I do it ?

After I delete all "undesired lines" I want to summerize Column K and Column M.
How can I do this ?


I am working with Office 2007

Thanks
zmau
0
Comment
Question by:zmau
[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
  • 4
  • 4
8 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 38841245
In a new column...

1. =ISNUMBER(SEARCH("Brg",j1))  copied down

2. =ISNA(MATCH(J1,{"Str_1","Str_2","String3","Str4"},0))  copied down

3: =AND(J1<>"",ISNA(MATCH(J1,{"Str_1","Str_2","String3","Str4"},0)))  copied down.

The TRUE results would be the rows to delete.
0
 
LVL 1

Author Comment

by:zmau
ID: 38843236
Thanks

I am not sure that I had understood.
1) Does this automatically delete the "undesired lines" ?
2) what is "copied down" ? Is this a valid Excel command ?
3) I was looking for a Macro.
4) I would like to look at the spreadsheet after the lines had been deleted.



Thanks
zmau
0
 
LVL 1

Author Comment

by:zmau
ID: 38843355
increase points
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:NBVC
ID: 38843415
My solution is a formula solution.

You enter the formula in the first row of a free column, then copy it down the column.

You can then use Autofilter to filter for TRUE in that column and delete those rows.  Then switch off Autofilter to see the remaining rows.

Macros are out of my jurisdiction, sadly :(
0
 
LVL 1

Author Comment

by:zmau
ID: 38843419
Thanks,

Just one thing : How do I use Autofilter ?


zmau
0
 
LVL 23

Expert Comment

by:NBVC
ID: 38843476
while you are in a cell in your table, go to Data and select Autofilter (the large Funnel icon).

You should see drop down arrows in the top row, go to the column with formulas.  Click the drop down arrow and check only the TRUE choice.

Now select all those rows and delete them.

Then reselect the filter and check ALL.
0
 
LVL 1

Author Comment

by:zmau
ID: 38843620
Thanks,

it almost works.....

I have two problems :

1.

Simple problem : when I try to summerize column M, is summerises also the hidden lines....
How can I summerize only the non hidden lines ?

2.

The file becomes much larger than the original file because of the "copy down step".
Here is how I "copy down" :  
Press Ctrl+C
go down one cell
Press Shift+End keys
Press down key
Now all of a sudden I have a milion lines (instead of the original 30,000 lines)
The problem is that now calculating the formula and/or saving the file takes a lot of time


Thanks
zmau
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 38843662
After you enter the formula in one cell copy it, then select the next cell down, go to the bottom of the sheet where your last row is, then hold the SHIFT key down and select the bottom cell, then copy.

You can then copy the column, right click, select Paste Special, then Values, this will remove the formulas.

Then filter.

If you are not deleting the "TRUE" rows, you can use SUBTOTAL() function.

e.g. =SUBTOTAL(9,M:M) will sum only the visible cells.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

734 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