+ Reply to Thread
Results 1 to 3 of 3

What function could help look at values in different columns & subtract based on values?

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    What function could help look at values in different columns & subtract based on values?

    I was thinking of writing multiple if statements but I don't think that will do the trick. What I would like is a formula to look at both column D & E. If column D is not null, then look for the next value in column D and subtract the values in column C. The same would apply if the value in column E is not null.

    column B in the attachment is what the values should look like.
    Attached Files Attached Files
    Last edited by AccountingJ; 03-21-2018 at 04:28 PM.

  2. #2
    Registered User
    Join Date
    12-21-2015
    Location
    United States
    MS-Off Ver
    2016
    Posts
    62

    Re: What function could help look at values in different columns & subtract based on value

    Rows 5 and 6 both have amounts in column D and none n E. Why in Row 5 do you subtract from Row 6, but in Row 6 subtract from Row 8?

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: What function could help look at values in different columns & subtract based on value

    Try this in B5:

    =MAX(MIN(IF(IF(D5="",E$5:E$10<>"",D$5:D$10<>"")*(C$5:C$10>C5),C$5:C$10))-C5,0) Ctrl Shift Enter

    Drag the formula down column B.

    Also, including the country that you are located in helps us know which regional settings your version of Excel will have.
    "Behind a Keyboard" doesn't help us much.

+ 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. [SOLVED] subtract values based on other columns
    By keywestsue in forum Excel General
    Replies: 3
    Last Post: 03-21-2017, 12:55 PM
  2. [SOLVED] [SOLVED] Help- Want to subtract values based on if check box is checked
    By oneuglydude in forum Excel General
    Replies: 5
    Last Post: 12-09-2016, 06:53 PM
  3. Add and Subtract Values based on dates
    By headwest in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2016, 08:01 AM
  4. Count and subtract IF function TRUE values from a separate total
    By jake658879 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-08-2014, 02:52 PM
  5. Replies: 1
    Last Post: 09-29-2011, 02:10 AM
  6. SUMIF based on certain criteria - and then subtract neg. values
    By Darlo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-20-2009, 10:09 AM
  7. Function to Subtract values with symbol within
    By jneeb in forum Excel General
    Replies: 6
    Last Post: 04-11-2008, 01:23 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