0

What formula should I use to get the first value in column B that does not equal "NONE" where the value in column A is "a":

enter image description here

Here I want the formula to return "5", because the first row with column A value of "a" and not having column B value of "None" is 5.

user2140261
  • 7,855
  • 7
  • 32
  • 45
alwbtc
  • 28,057
  • 62
  • 134
  • 188

1 Answers1

1

A simple solution would be to add a modified "key" column:

1

If you use VLOOKUP, or any other function to pull some info from table, it will return only the first met instance of lookup_value.

3

I bet you probably want some big stupid formula though.

Stepan1010
  • 3,136
  • 1
  • 16
  • 21
  • `I bet you probably want some big stupid formula though.` was a little unneeded. There are situation where a single formula is the best method. 2 being 1) if there are thousands or worse hundreds of thousands of rows, you would add a formula for every single row that would have to recalculate on full worksheet calculations and opens (would be very slow) vs a single formula even if slow would could still be much faster. Plus code maintainability is nice to not have to worry about a random group of 100 of the calculations being shifted to the wrong cells, either by your use of absolute address – user2140261 Apr 29 '14 at 22:01
  • or an outside macro of outside calculation. Or moving the data around. That said in certain cases your approach is widely accepted as a better approach. So +1. – user2140261 Apr 29 '14 at 22:02
  • @user2140261 I use long formulas. Sometimes people get a little carried away with their formulas though(myself included). Especially array formulas. It can be a restrictive way of thinking about a problem. Oftentimes, it is much simpler to write a UDF in VBA. Or doing what I did here (and often do) and make helper columns. – Stepan1010 Apr 30 '14 at 14:06