Reputation: 87
I have a table in excel with the following data:
A B C
1 Name Age Fare
2 Owen 22 7.25
3 Lionel 36 0
4 John 38 71.3
5 Gladys 5 8
6 Mark 12 0
My problem is I want to locate the row numbers where the value for column C is zero (in my example, it will give the 3rd and 6th row). I'll appreciate any kind of help since the data I got has 1000 rows and locating the row number with a zero value for column C is a bit time-consuming. Thank you!
Upvotes: 0
Views: 214
Reputation: 84465
Select column D adjacent to column C used range and enter the formula in one cell, with all still highlighted,
=IF(C2:C6=0,ROW())
C2:C6
being the used range in this case, and enter as an array formula with Ctrl+Shift+Enter.
You can then filter the results and remove FALSE
to leave the row numbers.
Upvotes: 0
Reputation: 96753
try the following:
=MATCH(0,C:C,0)
EDIT#1:
Place the above formula in E1 and in E2 enter:
=MATCH(0,INDEX(C:C,E1+1):INDEX(C:C,9999),0)+E1
and copy down ward until you see errors.
To avoid the appearance of errors use:
=IFERROR(MATCH(0,INDEX(C:C,E1+1):INDEX(C:C,9999),0)+E1,"")
instead.
Upvotes: 1
Reputation: 36840
Use following formula in D2
cell then drag and down as needed
=IF(C2=0,ROW(),"")
Upvotes: 3