Need help with writing a simple macro to parse lines.

  • Thread starter Thread starter kkirk
  • Start date Start date
K

kkirk

I got a sheet that has columns A thru P and rows 2 thru 26,000
something. What I need is a way to parse out the lines in which
columns E = M and F = N. Need something that will do it for all
lines. THere will be instances where E and F might be blank while data
would be in M & N, and vice versa, In cases like that since they don't
match, don't delete those lines. If it deletes a row will it create a
vacant row or will it shift up the data?

thanks,

KKirk
 
Kirk,

A simple way is to use autofilter.

Put this formula in say P2
=AND(E2=M2,F2=N2)

and then select column , and use autofilter to just show rows with the TRUE
value. When it is filtered, select all the visible rows and delete them.
Then take autofilter off.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I tried but I don't know how to make it work. I'm guessing under the
column you would pick custom, but I don't know what to stick in there.

It shows,

Show rows where:
[does not equal] [don't know what to stick here]
and
[nothing here yet][nothing here yet either]

I'm not sure what to put in these blocks.

thanks,
kkirk
 
Thanks Bob, that sounds do-able, but I don't know how to go about doing
it. I can stick the formula in one cell but I can't get it in all
cells in that column. That's probably an easy question, but I don't
use Excel alot.

Thanks,
kkirk
 
Kirk,

Put the formula in say P2.
Copy this cell.
Now goto Edit>Go To and put P26000 (ore whatever the number is) in the
Reference field
Hold down the shift key and click the Okay button.

The formula should now be copied to all of your rows.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
just drag fill the formula down the column.

Or, after entering the formula, select the cell, do Edit=>Copy, then select
the other cells in the column next to your data and do

Edit=>Paste
 
26,000 is a lot of dragging Tom <g>

Bob

Tom Ogilvy said:
just drag fill the formula down the column.

Or, after entering the formula, select the cell, do Edit=>Copy, then select
the other cells in the column next to your data and do

Edit=>Paste
 
Back
Top