LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RJB RJB is offline
external usenet poster
 
Posts: 86
Default Extracting Rows of Information Based on Value of One Column

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Rows based on a number in a field Yookaroo Excel Worksheet Functions 2 June 26th 09 10:46 PM
Extracting specific rows out of one worksheet based on an identifi Patrick Excel Discussion (Misc queries) 1 March 31st 09 04:23 PM
Consolidate information from Column B Based on Info In Column A Consol. Info from One Column to another Excel Worksheet Functions 1 October 27th 07 04:02 PM
Extracting rows based on value in first row Rob Excel Programming 2 November 28th 06 05:37 PM
Extracting rows based on fixed criteria EdMac Excel Discussion (Misc queries) 6 July 6th 06 07:07 PM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"