Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Google Sheets, How do I find the row number of a cell with certain text in it?

In Google Sheets, What do I do if I want a cell to display the row number in which a certain word/line of text appears?

So, I'm working with two kinds of spreadsheets here: One has the number of "Competitors" (which I'm looking for) in the 7th row of the spreadsheet, while others might have it in a different row. To work around this inconsistency, I want to set up a cell function which outputs the row number of where ever the "Competitors" number is, and then concatenate that function into a reference for the correct row-number.

The tables that I'm looking in all have the labels in the first column

Here are some viewable links to the Sheets I'm working on:

https://docs.google.com/spreadsheets/d/1SS_Bk2FFGNnsxhhg3RQGflTSxEncAjD-CaQBtPjTIVM/edit?usp=sharing

https://docs.google.com/spreadsheets/d/1JJvbiYUYT3zb8OFwHoF1WaLmEGkwO4N7lLLeBqgWRcw/edit?usp=sharing

^Notice how "Competitors" is in row 7 in one sheet but in row 6 in the other. This is why I need to find a function which can find a reference to the row number of "Competitors"

like image 841
Maxwell Ryan Fuller Avatar asked Feb 21 '18 23:02

Maxwell Ryan Fuller


People also ask

How do I count rows with specific text in Google Sheets?

=COUNTIF(A2:A13,"*mark*") This means that where this formula checks for the given condition, there could any number of characters/words before and after the criteria. In simple terms, if the word Mark (or whatever your criterion is) is present in the cell, this formula would count the cell.

How do I find the row number based on a cell value?

Supposing you want to know the row number of “ink” and you already know it locates at column A, you can use this formula of =MATCH("ink",A:A,0) in a blank cell to get it's row number. After entering the formula, and then press the Enter key, it will show the row number of the cell which contains "ink".

How do I count the number of occurrences of a string in Google Sheets?

You can use the =UNIQUE() and =COUNTIF() functions to count the number of occurrences of different values in a column in Google Sheets. The following step-by-step example shows how to do so.

How do I reference a row in Google Sheets?

A reference to a single cell is a combination of a letter and a number. For example, A1, C5, and E9 are all references to a single cell. The letter indicates the column and the number indicates the row. A range is referenced by using two cell references separated by a colon.


1 Answers

Figured it out - To find the row numbers that the string "Competitors" was in, All I had to do was use the MATCH function like this:

=MATCH("Competitors", A:A,0)

The user @Jeeped told me about the "Match" function in a comment under his answer. Although Jeeped's answer did demonstrate the "MATCH" function, he presented it being used along side the "SUM" function, which confused me at first. Give thanks/upvotes to Jeeped for helping me find the solution in this :)

like image 165
Maxwell Ryan Fuller Avatar answered Jan 02 '23 21:01

Maxwell Ryan Fuller