View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John Wood John Wood is offline
external usenet poster
 
Posts: 3
Default Finding a number in a list specificed on a worksheet

Thanks, I'm just tired and frustrated at my ignorance.

John

"K Dales" wrote:

Not the way I wrote it: Word wrap put the What:= line below the .Find line,
but they belong together; i.e.
Set OrderNoCell = Worksheets("Pending Orders").Range("A:A").Find _
What:=Worksheets("Order Review").Range("C1").Value, ...
When you use Range.Find, you need to set the results to another range
variable; the found cell will be stored in OrderNoCell (that is my intent).
The What argument is set equal to C1 as part of the code above.

Hope that makes sense now, sorry for the confusion!
--
- K Dales


"John Wood" wrote:

Should'nt I be setting this second line to:

Set OrderNoCell = Worksheets("Order Review").Range("C1")


"K Dales" wrote:

The syntax would be:
Dim OrderNoCell as Range
Set OrderNoCell = Worksheets("Pending Orders").Range("A:A").Find
What:=Worksheets("Order Review").Range("C1").Value, ...
--
- K Dales


"John Wood" wrote:

I've been trying to work this out by myself, to learn, but am running out of
time.

The project is, I have a customer order form that saves orders in a
worksheet named "Pending orders". The order number is always listed in
column A with the details to the left.

On another worksheet "Order Review", In cell C1,we enter the order number to
review data. When we are done reviewing the data, we hit a button to print a
series of reports.

The goal of this effort is to reference the order number in "Order Review"
cell C1, go back to "Pending Orders" read down column A to find the row the
order number is in, cut out the row (deleting the now empty row), and paste
the data into a new sheet (In-Process Orders) in the next empty row in column
A.

I am having trouble with the find function getting the "What" to reference
cell C1.

John