I have a spreadsheet that's like a company directory with Column A being names and the other columns having data points like email, location, manager, etc. What I want to do is search column A and when I find what I'm looking for, get the corresponding cell value in another column.
I don't see a way to search just a column and get back a cell object. If I use the col_values() method to get back a list, can I be guaranteed that the list returned will be ordered by row (i.e. array position 0 = row1, position 1 = row2, etc.). Is there a better way to do this?
I'm improving the answer given by user2822564 The
forin the answer above gives a non indentable error because thewks.row_countreturns a single number not a list. This is the final code that worked for me. Although thewhileiterates starting from the last row to the first so the returned data in case there are multiple results will be ordered from last to first.