Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Finding a number in a list specificed on a worksheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Finding a number in a list specificed on a worksheet

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Finding a number in a list specificed on a worksheet

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Finding a number in a list specificed on a worksheet

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
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

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 the number of a worksheet GeorgeJ Excel Discussion (Misc queries) 2 July 27th 07 09:02 PM
Finding largest number from list holyman Excel Discussion (Misc queries) 1 July 23rd 06 11:55 PM
finding a particular cell in another worksheet whose row number ch Andrew Excel Discussion (Misc queries) 1 September 12th 05 01:36 PM
Finding the 3rd largest number in a list Simon Jefford Excel Worksheet Functions 2 June 28th 05 04:01 PM
finding the second largest number in a list bobf Excel Discussion (Misc queries) 1 February 16th 05 01:19 PM


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