Michael Pate
Michael Pate

Reputation: 99

How to find out if a cell is within a specific range of rows in Google Sheets?

I am trying to figure out if a cell in Google Sheets is between a specified range of rows in the sheet. (Example: if cell A3 is within the range of rows 2-35, then do X task, else do Y task). Is there any way to do this using any built-in functions in Google Sheets, or if anyone can do a step by step on how to use Google Script to do the same task?

I have tried =If(and($A3>=$A$2:$Z$35, $A3<=$A$36:$Z$1000), X task, Y task) but it won't work. Is there a built-in function that does this task?

Upvotes: 1

Views: 196

Answers (1)

player0
player0

Reputation: 1

it would be like this:

=IF(MATCH(A3, C3:C35, 0), "x", "y")

update:

=QUERY(SORT(B1:G, 4, 0), 
 "select 'Master',Col1,Col2,Col3,Col4,Col5,Col6 
  limit 10
  label 'Master''Rank'", 1)

enter image description here

Upvotes: 2

Related Questions