+ Reply to Thread
Results 1 to 27 of 27

What is the right IF Function I should use for this situation?

  1. #1
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    What is the right IF Function I should use for this situation?

    Hello,
    Please I am confused about the right IF Function formula I should use for the following situation?
    If the value in the cell is NEGATIVE number I want the written result to be DEBIT.
    If the value in the cell is POSITIVE number I want the written result to be Credit.
    Thanks
    more about ISLAM => www.IslamQA.info

  2. #2
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: What is the right IF Function I should use for this situation?

    If the value is in cell A1:

    =IF(A1<0,"DEBIT","Credit")

  3. #3
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    =IF(A1>0,"Credit","Debit")
    here it is

  4. #4
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: What is the right IF Function I should use for this situation?

    Hi

    Try something like this.

    =if(a1<0,"depit",Credit")

    OR

    =if(a1<0,"depit",if(a1>0,"Credit"))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Thanks a lot for the very fast reply, now I get an error if the value is 0.
    Please may you edit it and add in case the value is equal to zero, the result to be BALANCED ?
    Thanks

  6. #6
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Thanks a lot for the very fast reply, now I get an error if the value is 0.
    Please may you edit it and add in case the value is equal to zero, the result to be BALANCED ?
    I mean can I make it like this format:-
    =IF(J4>0,"Credit","Debit";J4=0,"Balanced")
    Thanks

  7. #7
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    =IF(A1>0,"Credit",IF(A1=0,"Balanced","Debit"))


    try this

    Click * if u fix it

  8. #8
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: What is the right IF Function I should use for this situation?

    Hi,

    That formula won't work and you'll get an error.

    With a number in cell A1 try this formula: =IF(A1>0,"Credit",IF(A1<0,"Debit","Balanced"))

    Cheers

  9. #9
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: What is the right IF Function I should use for this situation?

    =IF(J4>0,"Credit",IF(J4=0,"Balanced","Debit"))

  10. #10
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Quote Originally Posted by Prashant24 View Post
    =IF(A1>0,"Credit",IF(A1=0,"Balanced","Debit"))


    try this

    Click * if u fix it
    it generate this error
    http://i.imgur.com/zIDeaUo.png
    Attached Images Attached Images

  11. #11
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: What is the right IF Function I should use for this situation?

    See posts #8 & #9!

  12. #12
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    =+IF(A1>0,"Credit",IF(A1=0,"Balanced","Debit"))

    its what i gave you enter it and change the cell address only i tested its working fine

  13. #13
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    u just missed the (,) comma sign somewhere in this formula check it try what i just gave u it will work

  14. #14
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    It is still generating an error.
    After I paste the formula it gives me this error:-
    sAlALOl.png
    Then after I click ok it is highlighting this part of the formula:-
    liaDO2Y.png

  15. #15
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: What is the right IF Function I should use for this situation?

    Take a look to the example pls.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: What is the right IF Function I should use for this situation?

    Maybee your general settings uses semicolon ; instead of comma ,

  17. #17
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    well it because you are using excel 2003 please use ; at the place of , it might resolve your problem

  18. #18
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: What is the right IF Function I should use for this situation?

    Either post #8 or #9 will give you a correct result if you copied the formula correctly and have them looking into the correct cell.

    Don't know what's happening .... any chance you could attach your spreadsheet here (but first remove any/all personal information/data)?


  19. #19
    Registered User
    Join Date
    08-20-2013
    Location
    Indore
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: What is the right IF Function I should use for this situation?

    Check out this example
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Thanks a lot for your help, it is working now
    Note:-
    "You must spread some Reputation around before giving it to Fotis1991 again."

  21. #21
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: What is the right IF Function I should use for this situation?

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

    Also my best regards to you and all the people in your Country. I wish ALL the best for ALL of you!

  22. #22
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: What is the right IF Function I should use for this situation?

    You are welcome and thanks for the feedback.

    Also thinking of you and your people - please take care.

  23. #23
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Thanks a lot.
    Yes it is madness here right now and killing is the only voice from the government.

  24. #24
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Please if I may ask for something extra.
    Can I change the font color of the words DEBIT, CREDIT, BALANCE.
    DEBIT=RED
    CREDIT=GREEN
    BALANCE=BLACK
    So how to do so?
    Thanks
    Last edited by MGadAllah; 08-24-2013 at 12:35 PM.

  25. #25
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: What is the right IF Function I should use for this situation?

    Hi,

    Trust you are well and safe.

    So have a look at the attached file with very simple Conditional Formatting rules. In case you don't know where the Conditional Formatting is, it's on the Home tab. Select cell E2, then select the Conditional Formatting drop-down arrow, then select "Manage Rules" - the Rule Manager dialog box will open and here you will see the simple rules. Select one of the rules, click on "Edit Rule..." and another dialog box opens showing the formula, and then you can click on "Format..." to see how the formatting of the Font is done. Once you understand, just click 'Cancel" 3 times to return to the sheet.

    Simple Conditional Formating.xlsx

    Best regards

  26. #26
    Forum Contributor
    Join Date
    04-13-2008
    Location
    EGYPT - Cairo
    MS-Off Ver
    2016
    Posts
    136

    Re: What is the right IF Function I should use for this situation?

    Thanks a lot

  27. #27
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: What is the right IF Function I should use for this situation?

    You are welcome - maybe now you should make this thread as Solved.

    All the best.

+ 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] Dragging down to copy function situation
    By Richard N in forum Excel General
    Replies: 2
    Last Post: 04-17-2013, 09:52 AM
  2. Which function do I use for this situation?
    By korygrandy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2008, 12:01 PM
  3. #N/A situation
    By bnwash in forum Excel General
    Replies: 5
    Last Post: 07-18-2007, 04:03 AM
  4. Can I use this situation?
    By tonyrice in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-22-2007, 12:57 PM
  5. need help with a If=then situation.
    By FireBrick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2005, 11:06 AM

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