Tablesearch multiple instances of key

I have a table with multiple instances of a key. It seems as though the tablesearch function will only return the first instance. Is there any way to return multiple instances of the same key?

Ultimately what I'm trying to do is display text from a cell whenever another cell in that same row shows a particular key. This key shows up in multiple rows in my table and so the final output should show multiple instances of text. I was trying to use the tablesearch function (along with the tablecellvalue function) but the problem is tablesearch only brings up the first instance.

Any ideas?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Yes. I believe I did a video tutorial on this. Go to the gshelper YouTube channel and look through the latest vids.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @pbrenna630‌ , repeat the search until it does not find another occurrence or the end of the table has been reached. Each time, set the start row for the search to the last found row +1.

  • pbrenna630pbrenna630 Member Posts: 2

    Hopscotch - that's a good idea. Would you recommend using the loop over table function in conjunction with the search to do that? Or something else?

    Braydon - I looked through the videos but couldn't find the one that addresses this topic. Do you know which specific one you were thinking of?

    Thanks

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    You're going to have to do a loop and look for each instance of the key. After finding the key, add it to a variable or table, then search again from that row or column forward. That's the main gist. With family for Christmas so not at a computer to find bids right now.

Sign In or Register to comment.