ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If statement; How to do something similar to - if(a1-a2=5,+5) (https://www.excelbanter.com/excel-programming/390152-if-statement%3B-how-do-something-similar-if-a1-a2-%3D5-5-a.html)

Magoo

If statement; How to do something similar to - if(a1-a2=5,+5)
 
If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.


Don Guillett

If statement; How to do something similar to - if(a1-a2=5,+5)
 

=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)

Don Guillett
SalesAid Software

"Magoo" wrote in message
oups.com...
If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.



Magoo

If statement; How to do something similar to - if(a1-a2=5,+5)
 
On May 25, 10:27 am, "Don Guillett" wrote:
=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)

Don Guillett
SalesAid Software
"Magoo" wrote in message

oups.com...



If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.- Hide quoted text -


- Show quoted text -


Don, What I would like to do is have the Cell be the Sum of a1-a2 but
with a twist.
If the sum is Less than or equal to 5, I would like to add 0.5 and
have that show up in the cell.
If the sum is Greater than that I just want the normal result.

for instance;
a1=40
a2=35

The difference of these would normally be 5. But I would like the
formula to add an additional 0.5 to that figure making it 5.5.

on the other hand if;
a1=40
a2=32

The difference would be 8. At this point would not need to add the
additional 0.5. So the Cell's Contents would remain 8.

I hope this makes sense...
Thanks for your Help!




Jon Peltier

If statement; How to do something similar to - if(a1-a2=5,+5)
 
A1-A2 is a difference, not a sum, which confused us. Also it wasn't clear
what you meant by +5 or +0.5. Try this:

=A1-A2+IF(A1-A2<=5,0.5,0)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Magoo" wrote in message
oups.com...
On May 25, 10:27 am, "Don Guillett" wrote:
=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)

Don Guillett
SalesAid Software
"Magoo" wrote in message

oups.com...



If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.- Hide quoted text -


- Show quoted text -


Don, What I would like to do is have the Cell be the Sum of a1-a2 but
with a twist.
If the sum is Less than or equal to 5, I would like to add 0.5 and
have that show up in the cell.
If the sum is Greater than that I just want the normal result.

for instance;
a1=40
a2=35

The difference of these would normally be 5. But I would like the
formula to add an additional 0.5 to that figure making it 5.5.

on the other hand if;
a1=40
a2=32

The difference would be 8. At this point would not need to add the
additional 0.5. So the Cell's Contents would remain 8.

I hope this makes sense...
Thanks for your Help!






JLGWhiz

If statement; How to do something similar to - if(a1-a2=5,+5)
 
=IF(A1+B1<=5,A1+B1+.05,A1+B1)


"Magoo" wrote:

On May 25, 10:27 am, "Don Guillett" wrote:
=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)

Don Guillett
SalesAid Software
"Magoo" wrote in message

oups.com...



If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.- Hide quoted text -


- Show quoted text -


Don, What I would like to do is have the Cell be the Sum of a1-a2 but
with a twist.
If the sum is Less than or equal to 5, I would like to add 0.5 and
have that show up in the cell.
If the sum is Greater than that I just want the normal result.

for instance;
a1=40
a2=35

The difference of these would normally be 5. But I would like the
formula to add an additional 0.5 to that figure making it 5.5.

on the other hand if;
a1=40
a2=32

The difference would be 8. At this point would not need to add the
additional 0.5. So the Cell's Contents would remain 8.

I hope this makes sense...
Thanks for your Help!





JLGWhiz

If statement; How to do something similar to - if(a1-a2=5,+5)
 
Sorry, you wanted that for the difference, didn't you.

=IF(A1-B1=5,A1-B1+.05,A1-B1)

"Magoo" wrote:

On May 25, 10:27 am, "Don Guillett" wrote:
=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)

Don Guillett
SalesAid Software
"Magoo" wrote in message

oups.com...



If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.- Hide quoted text -


- Show quoted text -


Don, What I would like to do is have the Cell be the Sum of a1-a2 but
with a twist.
If the sum is Less than or equal to 5, I would like to add 0.5 and
have that show up in the cell.
If the sum is Greater than that I just want the normal result.

for instance;
a1=40
a2=35

The difference of these would normally be 5. But I would like the
formula to add an additional 0.5 to that figure making it 5.5.

on the other hand if;
a1=40
a2=32

The difference would be 8. At this point would not need to add the
additional 0.5. So the Cell's Contents would remain 8.

I hope this makes sense...
Thanks for your Help!





Magoo

If statement; How to do something similar to - if(a1-a2=5,+5)
 
On May 25, 12:51 pm, JLGWhiz
wrote:
Sorry, you wanted that for the difference, didn't you.

=IF(A1-B1=5,A1-B1+.05,A1-B1)



"Magoo" wrote:
On May 25, 10:27 am, "Don Guillett" wrote:
=IF(A1+B1=5,.05,0)
or maybe you are looking for something like. You didn't say
=a2+IF(A1+B1=5,.05,0)
=123+IF(A1+B1=5,.05,0)


Don Guillett
SalesAid Software
"Magoo" wrote in message


roups.com...


If Sum of two cells is Greater than or equal to 5 then +0.5 If not
then normal sum.- Hide quoted text -


- Show quoted text -


Don, What I would like to do is have the Cell be the Sum of a1-a2 but
with a twist.
If the sum is Less than or equal to 5, I would like to add 0.5 and
have that show up in the cell.
If the sum is Greater than that I just want the normal result.


for instance;
a1=40
a2=35


The difference of these would normally be 5. But I would like the
formula to add an additional 0.5 to that figure making it 5.5.


on the other hand if;
a1=40
a2=32


The difference would be 8. At this point would not need to add the
additional 0.5. So the Cell's Contents would remain 8.


I hope this makes sense...
Thanks for your Help!- Hide quoted text -


- Show quoted text -


JLGWhiz thank you. This is exactly what I wanted.



All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com