+ Reply to Thread
Results 1 to 7 of 7

Find cell address of first negative number in a row

  1. #1
    Registered User
    Join Date
    10-14-2017
    Location
    San Francisco, USA
    MS-Off Ver
    single user office 2016
    Posts
    3

    Find cell address of first negative number in a row

    Sometimes the IRR or XIRR can not calculate unless the range starts at the first negative value. I need to figure out how that starting cell address, then use it in an IRR formula. I would like to avoid array formulas or VBA. Thanks for any help.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Find cell address of first negative number in a row

    All I can think of at this time is to seek a value less than zero (IF statement in the next column) and mark that cell. Then look for that mark via (MATCH ) and you got the row number of the first negative the long way.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Find cell address of first negative number in a row

    Here is a VBA solution to find the first negative number in Column A. I know that you requested a non-VBA solution, but I am just giving you choices.

    Please Login or Register  to view this content.
    Last edited by alansidman; 10-14-2017 at 02:14 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    10-14-2017
    Location
    San Francisco, USA
    MS-Off Ver
    single user office 2016
    Posts
    3

    Re: Find cell address of first negative number in a row

    Thanks for the responses.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Find cell address of first negative number in a row

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

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

    Re: Find cell address of first negative number in a row

    If your range is A2:A10 then you can use this formula to get the position of the first negative number in that range (e.g. 1 for A2, 2 for A3 etc.)

    =MATCH(1,INDEX((A2:A10<0)+0,0),0)

    .....and you can use INDEX to build the range that starts at that position and ends at A10, i.e.

    =INDEX(A2:A10,MATCH(1,INDEX((A2:A10<0)+0,0),0)):A10

    You can use that inside other formulas that reference a range, e.g.

    =IRR(INDEX(A2:A10,MATCH(1,INDEX((A2:A10<0)+0,0),0)):A10)
    Audere est facere

  7. #7
    Registered User
    Join Date
    10-14-2017
    Location
    San Francisco, USA
    MS-Off Ver
    single user office 2016
    Posts
    3

    Re: Find cell address of first negative number in a row

    Thanks. Great solution and now solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-26-2017, 12:05 PM
  2. Cell Address of First Negative Number in a Column
    By ericbartha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2016, 04:06 AM
  3. [SOLVED] Find first negative number in column, return row number
    By slade8200 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2014, 11:14 AM
  4. Find Top 5 Number from any Range with Cell Address
    By amitvsawaria in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-24-2014, 02:45 AM
  5. [SOLVED] HOW TO FIND THE COLUMN OR ROW NUMBER of a address stored in a cell
    By chrismonica in forum Excel General
    Replies: 3
    Last Post: 07-07-2012, 10:43 AM
  6. Find out the Row and Column address number of the searched cell (separately)
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-05-2011, 09:32 PM
  7. Find max number of character and return cell address
    By ExcelMonkey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-14-2006, 11:13 PM

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