Extracting Rows of Information Based on Value of One Column
You want simple?????
Drop the idea of deleting your data--you may actually find that you'll need it
later anyway.
But you can select the range with dates (G3:Gxxxx, include the header)
then do data|filter|autofilter
filter to show the today's date--or any other date you need.
I don't understand how other dates in the row affect your process, though.
RJB wrote:
I have a gi-normous list of info that gets imported from an outside database.
One of the columns - in the middle of the dang thing - is the "Event Date".
Sometimes I want to look at all the information related to events on a
specific day.
So what I'd like to do is:
- Create a cell - let's call it $A$2 - that has my "Desired Date" in it.
- Run a macro that deletes all rows that are NOT the date specified in cell
$A$2.
I have seen macros that use "ActiveCell" to accomplish this... But I want
for it literally to navigate to the right column on its own and do this.
In other words, I want the user to - no matter which cell they're in - click
on the macro button, and have Excel:
- Go to the first "Date" field (which on the first iteration will be $G4).
- Compare it to the "Desired Date" ($A$2).
- If it doesn't match, delete the whole row, and go to the next.
- If it DOES match, go down one row and do the comparison again.
There will be multiple entries for one date, so it will need to stop, think,
make a decision, and then go on.
There are also multiple dates in each row, so I can't just do a "For Each"
either.
(And also I will need the loop to stop when it runs out of rows... So how
would I tell it to "Do Until" column G is done?)
Thoughts?
(OK, more specific, "SIMPLE Thoughts?")
Thank you,
rjb
--
Dave Peterson
|