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"
=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.
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".
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.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With