Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding and retrieving info

I wish to search a column for a particular value.

If the value is found, I want to be able to copy all the information in
that particular row to a new worksheet. The original worksheet is then
searched again for any more occurrences of the value and if found, that
row is copied to row 2 of the new worksheet, and so on until the
orginal worksheet has been completely searched.

Can I write a macro to do that?

If so, the next step would be to search a number of columns in the
orginal worksheet for various values. If all values are found, the row
is copied to the new worksheet, and so on as above.

Any ideas would be greatly appreciated

Thanks
Matthew


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Finding and retrieving info

Matthew McManus < wrote:
I wish to search a column for a particular value.

If the value is found, I want to be able to copy all the information in
that particular row to a new worksheet. The original worksheet is then
searched again for any more occurrences of the value and if found, that
row is copied to row 2 of the new worksheet, and so on until the
orginal worksheet has been completely searched.

Can I write a macro to do that?


If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook, a macro is
not required. You can array enter into the first rows of the new
worksheet (enoughs rows to accommodate the number of occurrences of the
sought value, and enough columns to accommodate a full row) something
lke the following:

=ArrayRowFilter1(Sheet("whatever")!dataRange,relev ant_column,sought_value)

Alan Beban

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding and retrieving info

My question would be, what code do you want. Do you want search a range for
multiple instances of a value (see the example code for the FindNext method
in VBA help. You have the code).

Or do you want to search multiple columns for specific value, with a copy
occuring when all values are found in a single row?


Or are you asking for two things.

Generally, spoon feeding small parts of a problem to the group as single
questions is counter productive since while they may appear progressive to
you, from a programming standpoint, they may be better accomplished with
quite different algorithms - thus asking people to do work which is thrown
away.

--
Regards,
Tom Ogilvy


"Matthew McManus " wrote in
message ...
I wish to search a column for a particular value.

If the value is found, I want to be able to copy all the information in
that particular row to a new worksheet. The original worksheet is then
searched again for any more occurrences of the value and if found, that
row is copied to row 2 of the new worksheet, and so on until the
orginal worksheet has been completely searched.

Can I write a macro to do that?

If so, the next step would be to search a number of columns in the
orginal worksheet for various values. If all values are found, the row
is copied to the new worksheet, and so on as above.

Any ideas would be greatly appreciated

Thanks
Matthew


---
Message posted from http://www.ExcelForum.com/



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
Finding a value and returning corresponding info OssieMac Excel Discussion (Misc queries) 1 December 31st 09 01:16 AM
Finding info within a data set Lisa Excel Worksheet Functions 4 November 5th 08 11:33 PM
Retrieving info from multiple tables PMaravy Excel Discussion (Misc queries) 1 October 10th 08 05:15 PM
Finding info of one column and removing it from another Johnny B[_2_] Excel Discussion (Misc queries) 9 March 19th 07 09:19 PM


All times are GMT +1. The time now is 12:57 PM.

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

About Us

"It's about Microsoft Excel"