+ Reply to Thread
Results 1 to 7 of 7

Get EVERY cell addresses for search results not just the 1st!

  1. #1
    Forum Contributor
    Join Date
    09-11-2008
    Location
    uk
    MS-Off Ver
    365
    Posts
    424

    Get EVERY cell addresses for search results not just the 1st!

    All,

    I hope you guys can help me with the below issue.

    In the attached workbook, there is data in column A.

    The workbook's only macro is triggered by a button that generates a simple search form.

    The macro highlights all the occurrences of the search word perfectly; but only returns the first address, NOT every address (Try inputting "3")

    Obviously, I need ALL the cell addresses of every cell that has the word or search string in it.

    So, at the moment, I only get the first incident for the search, and can't suss out how to get the other responses!!

    I think the issue lies within this part of the code:

    Please Login or Register  to view this content.
    Please could somebody have a look and tell me what I'm doing wrong or suggest a workaround?

    Thanks for looking.

    Skyping
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    293

    Re: Get EVERY cell addresses for search results not just the 1st!

    You would need add it to a string each time it loops.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    293

    Re: Get EVERY cell addresses for search results not just the 1st!

    I actually just noticed your search function isn't explicit and will find any cells containing the number, so in your example, if I searched for 5, it returns the cell with "5" and also the cell with "45"

    you can fix this by replacing;

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,986

    Re: Get EVERY cell addresses for search results not just the 1st!

    Please Login or Register  to view this content.
    If you add a header in A1 then can use a filter...
    Please Login or Register  to view this content.
    Last edited by Sintek; 10-11-2024 at 11:43 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  5. #5
    Forum Contributor
    Join Date
    09-11-2008
    Location
    uk
    MS-Off Ver
    365
    Posts
    424

    Re: Get EVERY cell addresses for search results not just the 1st!

    Thank you both so much....absolutely brilliant!!

    SOLVED

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,986

    Re: Get EVERY cell addresses for search results not just the 1st!

    Happy to have contributed...Tx for rep +

  7. #7
    Registered User
    Join Date
    10-11-2024
    Location
    Sun City West, AZ
    MS-Off Ver
    365
    Posts
    1

    Re: Get EVERY cell addresses for search results not just the 1st!

    I have a StaffListing spreadsheet 'tab' (main reference to each individual) with FName, LName, Rank, and IDNumber. Staff can attrition in and out of listing. Max size is 125 members.

    Like in a database, I would like to have the StaffListing repeated automatically into each new spreadsheet tab within the file, so that I only have to update the StaffListing once with changes and those changes auto-add to each subsequent spreadsheet tab. Additionally to the StaffListing, there are other tabs with pertinent info, such as attendance, promotions with dates and rank, reimbursement of expenses, training, duties and more.

    Question: how do I 'autolink' the StaffListing to other spreadsheet tabs, and then design an input page under each category ... like in a database. Staff listing will not exceed 125 members.

    Thank you!

+ 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. Add specific cell to the end of results on VBA search
    By Christy_kaye in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2021, 04:21 PM
  2. [SOLVED] Search by cell ( address.. Array all results not only 1.
    By Gochix2018 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2020, 01:45 PM
  3. Replies: 4
    Last Post: 01-13-2019, 01:46 PM
  4. [SOLVED] Search Terms, Paste All Same Cell Separated By Commas - Email Addresses
    By Logit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2018, 11:08 PM
  5. Search Different Ranges Based On Different Cell Results
    By BrianOfNazareth in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-31-2016, 10:50 AM
  6. Replies: 0
    Last Post: 05-13-2014, 01:25 AM
  7. Combining search results into one cell
    By antoni.konarski in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-02-2009, 08:04 AM

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