Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the number of a worksheet | Excel Discussion (Misc queries) | |||
Finding largest number from list | Excel Discussion (Misc queries) | |||
finding a particular cell in another worksheet whose row number ch | Excel Discussion (Misc queries) | |||
Finding the 3rd largest number in a list | Excel Worksheet Functions | |||
finding the second largest number in a list | Excel Discussion (Misc queries) |