+ Reply to Thread
Results 1 to 3 of 3

Find the first negative number in a column?

  1. #1
    Registered User
    Join Date
    04-10-2007
    Location
    Marietta, GA
    Posts
    25

    Question Find the first negative number in a column?

    I am trying to use a formula that will start at the top of a column and work downward until it finds the first negative number. Once it find this number I want it to return the value 1 column to the left using a vlookup. Is this possible? Also, it is possible that it may not find a negative number and I need to be able to return a response if this is the case (I guess I'll use an IF statement).

    If anyone can help I'd really appreciate it.

    Thanks,
    Jeff

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Hello Jeff,

    If you're searching for the first negative number in B2:B100 and then want to return the corresponding entry from column A try this

    =IF(COUNTIF(B2:B100,"<0"),INDEX(A2:A100,MATCH(TRUE,INDEX(B2:B100<0,0),0)),"No negative numbers")

  3. #3
    Registered User
    Join Date
    04-10-2007
    Location
    Marietta, GA
    Posts
    25

    Talking Thanks

    That worked just like I wanted! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1