Forum Discussion
How can I select cells in the column right next to, but in the same rows as the search results?
Hello,
I was wondering how I can select all the cells that are in the column right next to and, at the same time, are in the same row(s) as the "search result cells". By "search result cells", I mean the all the cells that are selected by a search result.
For example, suppose I have following table, I want to copy every entry in column A that are in the same rows as the cells with the entry "cat" in the column B, and paste them to the corresponding cells (in the same row) in the column C. In other words, I want to select "random input 1" and "random input 4" in column A by searching "cat" entries in the column B, and then paste them in column C so that cell C1 will have the entry of "random input 1" and C4 will have the entry of "random input 4".
| A | B | C | |
| 1 | random input 1 | cat | |
| 2 | random input 2 | dog | |
| 3 | random input 3 | dog | |
| 4 | random input 4 | cat | |
| 5 | random input 5 | dog |
Please pardon my long wording. If anything I tried to explain or deliver is unclear, please let me know. I will try to make it even more clear.
Thank you for your help!
Kang
4 Replies
- mtarlerSilver Contributor
I think your best is
a) use a formula in column C like: =IF (B2="cat", A2, "") and fill down - khjhzwCopper ContributorThank you so much for your help!
This is exactly what I was looking for.- mtarlerSilver Contributoractually scratch the second as it doesn't work on multiple areas (I tested it on a continuous section). I thought there was a way to do that but will have to search to see if it possible.
meanwhile go with option a)
i will edit msg to prevent confusion