+ Reply to Thread
Results 1 to 6 of 6

If & AND function Help

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    If & AND function Help

    Hi Team,

    I am looking to reduce manual work and errors over data management on a spreadsheet.

    I have inputted a formula in column AE
    Formula: copy to clipboard
    =IF(U5<0,"LOAN","DEPOSIT")
    . Also added a conditional highlighting for column U

    However, my output that i am looking for is that if the amount in column AA is Positive and column U is negative or and vice versa, column AE should throw a comment "ERROR"

    Or if the amount in column AA is greater than U, column AE should throw a comment "ERROR"

    Can you please help me with a formula for the same.
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If & AND function Help

    As per your conditions may be this......

    =IF(OR(AND(AA5>0,U5<0),AND(AA5<0,U5>0),AA5>U5),"Error",IF(U5<0,"LOAN","DEPOSIT"))
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: If & AND function Help

    Try:

    Formula: copy to clipboard
    =IF(OR(SIGN(U5)<>SIGN(AA5),AA5>U5),"ERROR",IF(U5<0,"LOAN","DEPOSIT"))
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: If & AND function Help

    Hi - somehow the codes are not working. instead of adding all formulae on one cell, i thought of splitting the formula.

    on column AC i will add this formula.
    Formula: copy to clipboard
    =IF(AA22>U22,"CHECK","PROCEED")


    However, this works only when the column AA> column U. But when the amounts are negative, then this formula does not work. Since -300 is > 2,300,000 numerically but not when you speak about payments. Here i can pay -2300 but i am paying only -300.
    E.g. Row 34
    This is where my formula breaks. Can you please help.
    Attached Files Attached Files

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: If & AND function Help

    How about:
    Formula: copy to clipboard
    =IF(OR(SIGN(U5)<>SIGN(AA5),ABS(AA5)>ABS(U5)),"ERROR",IF(U5<0,"LOAN","DEPOSIT"))

  6. #6
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: If & AND function Help

    May be this

    =IF(AA5>U5,"Error",IF(SIGN(U5)*SIGN(AA5)=-1,"Error",IF(U5<0,"LOAN","DEPOSIT")))
    Click just below left if it helps, Boo?ath?

+ 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: 13
    Last Post: 04-08-2014, 05:46 AM
  2. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  3. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 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