Results 1 to 1 of 1

Take previous value if false

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Take previous value if false

    Hi there,

    I have a long if function, where if "false," I want to grab the closest previous cell (in the same column) that has a value.

    Here is my formula: =IF(SUM($B4:$L4)>=45,SUM(SUMIF($B4:$L4,LARGE($B4:$L4,{1,2,3}),$Z4:$AJ4))INSERT IF FALSE HERE!)+IF(SUM($B4:$L4)>=45,SUM(SUMIF($B4:$L4,SMALL($B4:$L4,{1,2,3}),$Z4:$AJ4)))

    To walk you through what I've done: If the sum of array 1 >=45, then sum the three cells in array 2 based on their position in array 1. The first If function sums the three largest criteria in array 1, the second if function sums the smallest.

    The important part is where I've written INSERT IF FALSE HERE. In the standard IF( condition, [value_if_true], [value_if_false] ) formula, I want the [value_if_false] to express that, if the sum of array 1 is less than 45(condition), pull the closest previous cell with a value in it.

    For example, in the sheet attached, since cell AL6 does not have a value (i.e. because, SUM($B6:$L6) does not =45), I want the 0 to be replaced with the closest previous cell with a value, which in this case is AL3.


    I would think I need to use some type of vlookup...
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find certain word, copy and paste cell in previous row if previous row is blank
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 12:53 PM
  2. If statement, answer is false, hide false.
    By Mel B in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-07-2013, 06:36 PM
  3. Replies: 0
    Last Post: 10-14-2011, 12:09 PM
  4. Replies: 1
    Last Post: 12-01-2010, 03:20 PM
  5. Replies: 11
    Last Post: 06-27-2008, 04:39 PM

Tags for this Thread

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