Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Select rows contain Xin Column Y

I have a large amount data that gets dumped into a CSV
file every week where 40% of it is useless to me.
Sample data:
Column A = Date, Column B = Time, Column C = Division,
Column D = Group, E = Function etc..

The pseudocode for what I'd like to do is:
1) Select all rows that contain HR in Column C that
contain Hiring in column D OR Training in column D
2) Delete the selected rows

Thanks
Hafeez Esmail
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Select rows contain Xin Column Y

You can do this with an autofilter

Select a cell in your data

do Data=Filter=Autofilter
in the dropdown in column C, select HR

in the dropdown in Column C, select custom, then equals Hiring or equals
Training.

Now select the entire data area except your header row and delete, entire
row.

Only the visible rows will be deleted. Now remove the Autofilter

Data=filter=Autofilter

If you want code, turn on the macro recorder before you do this manually.
Turn it off when done.

clean up the code to generalize it as necessary.

--
Regards,
Tom Ogilvy

Hafeez Esmail wrote in message
...
I have a large amount data that gets dumped into a CSV
file every week where 40% of it is useless to me.
Sample data:
Column A = Date, Column B = Time, Column C = Division,
Column D = Group, E = Function etc..

The pseudocode for what I'd like to do is:
1) Select all rows that contain HR in Column C that
contain Hiring in column D OR Training in column D
2) Delete the selected rows

Thanks
Hafeez Esmail



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Select rows contain Xin Column Y

Hi Hafeez,

Thank you for posting in MSDN managed newsgroup!

I agree with Tom on this issue. You can filter these rows with the help of autofilter.

If you have any questions, please feel free to let me know!

Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Select rows contain Xin Column Y

Thanks for the excellent suggestion Tom, I've made a lot
of progress on my macro.

I've hit a road block and have spent a lot of time trying
to over come it.
My date field is of category 'general' and will always
contian dates in the following format, "dd.MMM. YYYY" (the
space is there intentionally)

How do I filter all the dates (which I'll then be
removing) that are not between the most recent date and 5
days previous to the most recent date?

I'd appreciate any help you can give
Thanks

Hafeez Esmail
-----Original Message-----
You can do this with an autofilter

Select a cell in your data

do Data=Filter=Autofilter
in the dropdown in column C, select HR

in the dropdown in Column C, select custom, then equals

Hiring or equals
Training.

Now select the entire data area except your header row

and delete, entire
row.

Only the visible rows will be deleted. Now remove the

Autofilter

Data=filter=Autofilter

If you want code, turn on the macro recorder before you

do this manually.
Turn it off when done.

clean up the code to generalize it as necessary.

--
Regards,
Tom Ogilvy

Hafeez Esmail wrote in message
...
I have a large amount data that gets dumped into a CSV
file every week where 40% of it is useless to me.
Sample data:
Column A = Date, Column B = Time, Column C = Division,
Column D = Group, E = Function etc..

The pseudocode for what I'd like to do is:
1) Select all rows that contain HR in Column C that
contain Hiring in column D OR Training in column D
2) Delete the selected rows

Thanks
Hafeez Esmail



.

Reply
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
How to select data in non adjacent rows of a column automatically jdpf Excel Discussion (Misc queries) 5 March 23rd 09 11:32 PM
Help tonight?!! select rows based on cell value in a column Lighthouse1 Excel Worksheet Functions 1 January 31st 07 03:57 AM
select rows to print where there's data in specific column ebarbieri Excel Discussion (Misc queries) 1 July 4th 06 11:54 PM
Need to select rows to average based on a value in a different column Randy K New Users to Excel 1 February 15th 06 02:03 AM
In Excel: select the last 20 rows of data in a column Tad Blanchard Excel Worksheet Functions 2 November 25th 05 10:35 AM


All times are GMT +1. The time now is 09:23 AM.

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"