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

1. ## 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  Register To Reply

2. ## 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")  Register To Reply

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

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

4. ## 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"))  Register To Reply

5. ## 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  Register To Reply

6. ## 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  Register To Reply

7. ## 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  Register To Reply

8. ## 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   Register To Reply

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

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

10. ## Re: What is the right IF Function I should use for this situation? Originally Posted by Prashant24 =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  Register To Reply

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

See posts #8 & #9!   Register To Reply

12. ## 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  Register To Reply

13. ## 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  Register To Reply

14. ## 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:-  Register To Reply

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

Take a look to the example pls.  Register To Reply

16. ## Re: What is the right IF Function I should use for this situation?  Register To Reply

17. ## 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  Register To Reply

18. ## 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)?   Register To Reply

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

Check out this example  Register To Reply

20. ## 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."  Register To Reply

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

You are welcome and thanks for the feed back. Also my best regards to you and all the people in your Country. I wish ALL the best for ALL of you!   Register To Reply

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

You are welcome and thanks for the feedback.  Register To Reply

23. ## 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.  Register To Reply

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

Can I change the font color of the words DEBIT, CREDIT, BALANCE.
DEBIT=RED
CREDIT=GREEN
BALANCE=BLACK
So how to do so?
Thanks   Register To Reply

25. ## 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   Register To Reply

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

Thanks a lot   Register To Reply

27. ## 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.  Register To Reply