1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel finding and copying

Discussion in 'Business Applications' started by goaldy, Apr 11, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. goaldy

    goaldy Thread Starter

    Joined:
    Apr 11, 2004
    Messages:
    1
    Hello, i have a product s/sheet of over 2000 products - each product being a row in the s/sheet. Is there such a command to highlight/select the row in which i can specify a unique cell value of a row by using find??
    I want to be able to highlight/select the row which has the barcode "xxxxxx" (the product barcode is one the product's values - each product/row has a unique barcode value).

    If anyone can help then THANK YOU!!!
     
  2. XL Guru

    XL Guru

    Joined:
    Aug 30, 2003
    Messages:
    2,702
    You could try a macro. Something like

    Sub HighlightRow()
    mynum = Application.InputBox("Enter barcode number")
    On Error GoTo 1:

    Columns("A:A").Select
    Selection.Find(What:=mynum, After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False).Activate
    ActiveCell.Select
    Selection.EntireRow.Select
    1:
    MsgBox "Number not found."
    End Sub

    You'd need to specify the relevant column instead of A:A.

    Rgds/Happy Easter,
    Andy
     
  3. XL Guru

    XL Guru

    Joined:
    Aug 30, 2003
    Messages:
    2,702
    NB - error handler on this is flawed. I'll fix it tomorrow, or when My Bumper Book of VBA gets in at the library, whichever's sooner.

    Rgds/Happy Easter,
    Andy
     
  4. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    What is the ultimate goal of highlighting these records? Will these highlighted records be copied or cut to somewhere else? If you are simply trying to seperate them from the other records, why not just use an autofilter to produce a seperate list of the records you are interested in?


    Rollin
     
  5. XL Guru

    XL Guru

    Joined:
    Aug 30, 2003
    Messages:
    2,702
    Rollin,

    >> What is the ultimate goal of highlighting these records? ...
    >> ... why not just use an autofilter ... ?

    Could be a fair point given the title of the post, although you'd have to AutoFilter repeatedly for each record you wanted. Even with Custom AutoFilter, you'd be limited to fetching 2 records at a time.

    (Data -- Filter -- ) Advanced Filter might be worth a look. You'd just set up the "barcodes to fetch" criteria list first, as per the attached.

    NB - to fetch the records straight to a different sheet, the Advanced Filter process must be initiated from that sheet.

    Rgds/Happy Easter,
    Andy
     

    Attached Files:

  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/219311

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice