sammysrefuge
New Member
- Joined
- Jun 9, 2015
- Messages
- 6
I am trying to find the row number for a specific value where the value in the list equals or is greater than the value I am searching for.
When looking for the exact value in a list, the following works:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4/14/2015[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4/16/2015[/TD]
[/TR]
</tbody>[/TABLE]
=MATCH(A1,A3:A5,0)+ROW(A3:A5)-1
The formula above returns 4 which is correct.
However, when looking for a value that is "greater than" then it doesn't work. See below:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4/14/2015[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4/16/2015[/TD]
[/TR]
</tbody>[/TABLE]
=MATCH(A1,A3:A5,-1)+ROW(A3:A5)-1
I want the formula above to return a 4 but instead it returns "#N/A"
Any suggestions?
Thanks,
Jason
When looking for the exact value in a list, the following works:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4/14/2015[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4/16/2015[/TD]
[/TR]
</tbody>[/TABLE]
=MATCH(A1,A3:A5,0)+ROW(A3:A5)-1
The formula above returns 4 which is correct.
However, when looking for a value that is "greater than" then it doesn't work. See below:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/15/2015[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4/14/2015[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4/16/2015[/TD]
[/TR]
</tbody>[/TABLE]
=MATCH(A1,A3:A5,-1)+ROW(A3:A5)-1
I want the formula above to return a 4 but instead it returns "#N/A"
Any suggestions?
Thanks,
Jason