Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default 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!





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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!




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reconcile Bank statement & Credit card statement & accounting data Bklynhyc Excel Worksheet Functions 0 October 7th 09 09:07 PM
if statement or other methds to find similar data Funky[_2_] Excel Worksheet Functions 2 April 25th 08 03:33 PM
SQL REPLACE Statement (or similar) in MS Query iain_m Excel Programming 0 May 4th 06 10:46 AM
how to create automatic macro with if statement or similar betatryck_se Excel Discussion (Misc queries) 2 December 14th 05 11:32 AM
IF statement with logical_value that is similar to this 0 Mortgage Man Excel Worksheet Functions 6 August 31st 05 10:51 PM


All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"