?
Solved

Newby question - Search Excel sheet and delete undesired lines

Posted on 2013-01-31
8
Medium Priority
?
198 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 1500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

718 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