+ Reply to Thread
Results 1 to 5 of 5

Finding a number in a list specificed on a worksheet

  1. #1
    John Wood
    Guest

    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. #2
    K Dales
    Guest

    RE: 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. #3
    John Wood
    Guest

    RE: 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. #4
    K Dales
    Guest

    RE: 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. #5
    John Wood
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1