+ Reply to Thread
Results 1 to 2 of 2

want to search upwards in a column on a worksheet

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    ohio
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question want to search upwards in a column on a worksheet

    I want to search upwards in a column to find the last value not equal to a value (0,"", etc) so that I can perform a calculation using that value. Here is an example of the sheet.

    A B
    1 21 21
    2 17 38
    3 21 59
    4 21 80
    5 0
    6 4 84
    7 4 84
    8 0
    9 4 84

    working my way down the column, what I want to do is take a value in column B and add it to the value in column A if the value in A is not 0. The first value in B will always equal the value in A if that value is not 0. If the search upwards shows only null fields or it hits the first row in the column without finding a value, that value in the current B cell should show the value in column A. I want the field to show null if A is 0. I want a formula that will look upwards in the column to find the last non-null value to add my value in column A. example : formula in B5 should show a null (""), the formula in B6 should show 84 (B4+A6), the formula in B7 should show 88 (B6+A7), formula in B8 should show null (""), etc. Column A will change values from time to time and I would like the formula to automatically be able to handle the change in values. Complex enough? I hope that this is clear for you. Thank you.

    John

  2. #2
    Forum Contributor
    Join Date
    03-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    154

    Re: want to search upwards in a column on a worksheet

    Try this:

    =IF(A1=0,"",SUM($A$1:A1))

+ 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