If statement help (if it has negative numbers)

patni

Board Regular
Joined
Jul 22, 2018
Messages
58
Hey guys,
I need a help.

I need hep with a IF statement.


conditions are:

If cell D43 is greater than or equal to 1, then i want it to show text "san"
if cell D43 is in negative number and is greater than or equal to -1, then i want it to show text "san"
If cell D43="", then ""

I did this code but its very clearly wrong.
Code:
=IF(D43>=1,"san",IF(D43<0,"san",""))

Can anyone please help me out

Thank you
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hey Alansidman,

The code is not working as of now.

I want it to show "san" if D43 is reater than or equal to 1.

Code:
[COLOR=#333333]If cell D43 is greater than or equal to 1, then i want it to show text "san"[/COLOR]
[COLOR=#333333]if cell D43 is in negative number and is greater than or equal to -1, then i want it to show text "san"[/COLOR]
[COLOR=#333333]If cell D43="", then ""[/COLOR]
 
Upvote 0
How can a number be negative and be greater than -1. Are you referring to values between zero and -1 only, ie. -.5 or -.25 for example?

I am reading your request that you want "san" to appear if the value is anything other than blank. What am I missing here.
 
Last edited:
Upvote 0
Hey Alan.

Really sorry . I forgot basic maths.

I mean -1 and values more than -1 which is -1,-2,-3......

Sorry
 
Upvote 0
Hi, here is one option.

=IF(ABS(D43)>=1,"san","")
 
Upvote 0
ABS will convert a negative number to a positive so could go:

=IF(ABS(D43)>=1,"san","")

presuming that if the number isnt greater than 1 you want a blank.
 
Upvote 0
Hey Steve,

thank you so much!
It is working perfectly.
Thank you for your time and help.

Thank you! I will update you if i face any problem.
Thanks again
 
Upvote 0
Hey FormR,

Thank you so much for the help. Its working perfectly!
Thanks for the time
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top