Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with row selection.


I cannot seem to find a solution to this. I am sure there is one.

I have a data file that I import into excel and I am able to create
input box to have the user insert text to search for what they need.
can get it to return the value of the row it finds the first cas
(There are several). I can also get it to find the last case of i
along with the row but how do I select these rows, and the row
inbetween so I can copy them to another sheet to further filter ou
which information I need?


I hope I was able to explain my problem

Craig Schellenbach

Aim: Drrott

--
Drrott
-----------------------------------------------------------------------
Drrott1's Profile:
http://www.excelforum.com/member.php...fo&userid=1546
View this thread: http://www.excelforum.com/showthread.php?threadid=27048

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with row selection.


This may not be terribly elegant but it works:

Create a worksheet that you will eventually hide.
Name a cell on this worksheet “CountOfSearch”

At the point in your code immediately after you have selected the rang
you are searching:

1. Name the range using the ApplyNames method
2. Count the number of times the search text appears in the range usin
the following formula:
Range(“CountOfSearch”).value
"=COUNTIF(Range(“SearchRange”),SearchCriteria) "
Counter= Range(“CountOfSearch”).value

where SearchCriteria is the variable generated by your input box
3. Then use a Do Loop to iterate through the selected range for numbe
of iterations = Counter
In each iteration you can copy/paste the row to another workshee
(remember to move the row in the destination sheet down 1 row eac
time!

Hope this help

--
David Holtb
-----------------------------------------------------------------------
David Holtby's Profile: http://www.excelforum.com/member.php...fo&userid=1540
View this thread: http://www.excelforum.com/showthread.php?threadid=27048

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
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM


All times are GMT +1. The time now is 10: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"