+ Reply to Thread
Results 1 to 6 of 6

IF Function with 2 columns confusion

Hybrid View

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2007
    Posts
    2

    IF Function with 2 columns confusion

    Hello all,

    I'm having slight difficulty with a multiple IF function. I have the following fomula:

    =IF(D3="",0,IF(D3>0,VALUE(0-D3),IF(E3="",0,IF(E3>0,1,0))))

    The D3 column works, but the E3 column does not. I am trying to construct a simple Accounts T-Chart (which I Have attached for reference).

    The D-column is debit, E-column is credit; the F column will be either the inverse (by value(0-D3)) of the value in D3, or the value of E3, and the running balance in Column G will be the sum of F:F. The F-column will contain the function and be hidden once completed.

    Anyone have any insight? I tried researching the AND function and although I understand the basics, it does not produce the data needed.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,111

    Re: IF Function with 2 columns confusion

    =IF(D3="",0,IF(D3>0,VALUE(0-D3)

    so the only way to get to the false here and use E
    is if D3 is a negative value or zero

    is that the situation you wanted ?

    thats how it appears to work in the spreadsheet as well - but 0 or - value and you get a 1

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: IF Function with 2 columns confusion

    hi

    I think that all you need is this.

    =VALUE(E3)-VALUE(D3)
    Enjoy

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: IF Function with 2 columns confusion

    Quote Originally Posted by mehmetcik View Post
    hi

    I think that all you need is this.

    =VALUE(E3)-VALUE(D3)

    Enjoy
    Again, the use of VALUE is redundant as the arithmetic operators will coerce eventual text strings to numbers

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: IF Function with 2 columns confusion

    Why use VALUE(0-D3)? -D3 is more than enough ( I don't quite understand what you are trying to do)

  6. #6
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: IF Function with 2 columns confusion

    I think from what you are explaining the formula in Col F should be:

    =E3-D3
    As for a running balance the sum of F:F is the current balance assuming the starting value of the account is 0. To make this a running total. you need to enter in G3:

    =F3
    Then in G4:

    =G3+F4
    This can be copied down to perform a running total.
    Say thanks, click *

+ 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