# 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

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")

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

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

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"))

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

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

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

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

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

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

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

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

See posts #8 & #9!

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

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

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:-

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

Take a look to the example pls.

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

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)?

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

Check out this example

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."

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!

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

You are welcome and thanks for the feedback.

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.

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

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

Thanks a lot

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.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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