+ Reply to Thread
Results 1 to 5 of 5

need to print row locations where a value appears in a range

  1. #1
    Registered User
    Join Date
    10-01-2020
    Location
    London, England
    MS-Off Ver
    365
    Posts
    78

    Question need to print row locations where a value appears in a range

    Hi,

    I have a list of around 1600 values, many are duplicated as they are part numbers in builds and as such many parts are common across many builds.
    I have copied the list of parts and removed all duplicates in a new column, so I am left with a list of unique values that appear in the initial range.

    I now need to search through the unique range and print beside it, in separate cells, the row numbers where the values appear in the original range.

    There are around 500 unique values.
    Attached is an example which should hopefully make sense.
    **It seems I can't attach files, the menu doesn't work...
    See screen shot...

    range search.jpg

    I have no idea how to do this sort of thing, so any help is appreciated.

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: need to print row locations where a value appears in a range

    Welcome to the forum neilosj

    Try below code based on attached pic...
    Please Login or Register  to view this content.
    Last edited by nankw83; 10-01-2020 at 08:52 AM. Reason: Changed code as per attached picture
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: need to print row locations where a value appears in a range

    Hi & welcome to the board.
    You can do this with a couple of formulae, if you want.
    In F6
    =UNIQUE(A6:A21)
    Then in H6 copied down
    =TRANSPOSE(FILTER(ROW(A6:A21),A6:A21=F6))

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: need to print row locations where a value appears in a range

    another basic method
    Please Login or Register  to view this content.
    Last edited by nigelog; 10-01-2020 at 09:49 AM.

  5. #5
    Registered User
    Join Date
    10-01-2020
    Location
    London, England
    MS-Off Ver
    365
    Posts
    78

    Re: need to print row locations where a value appears in a range

    Amazing, thanks friends!
    This has saved me many hours of potential manual, error prone work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. My Word doc appears to print but nothing actually happens
    By samosapowis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2020, 10:35 AM
  2. show sheet when it appears the print dialog box
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-11-2018, 08:11 PM
  3. VBA to set print range, open box asking for print qty, print, then redefine print area
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 06:43 PM
  4. Replies: 4
    Last Post: 12-27-2011, 06:20 PM
  5. Print / Save to PDF - Formating / Locations change
    By Gil-Dale in forum Excel General
    Replies: 1
    Last Post: 06-12-2009, 09:06 PM
  6. Replies: 2
    Last Post: 11-07-2005, 05:10 AM
  7. Clip art used appears on screen but does not print
    By texnckn in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-17-2005, 06:06 PM

Tags for this Thread

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