function - Excel - Return the first negative number of a column -


i'm using excel 2010 , i'm looking way return first negative number of column. instance, have following numbers distributed in column: 1 4 6 -3 4 -1 -10 8 function use return -3? thanks!

this interpreted 2 ways... if numbers in single cell (one column) string, mid function can used. if numbers in a1, formula work this:

=value(mid(a1,search("-",a1),search(" ",a1,search("-",a1))-search("-",a1))) 

if numbers each in own columns (in example, a3:h3), different technique must used:

{=index(a3:h3,1,match(true,a3:h3<0,0))} 

don't type { } - enter equation using ctrl+shift+enter.

in each case, formula return number -3, first negative number in series.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -