Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Cell Programing

Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,

--
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Cell Programing

Hi John,

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2))

The above places a null value (which is represented by the double quotes) if
division by 5 does not return a whole number; otherwise will sum the range.

--
Regards,

OssieMac


"John Savy" wrote:

Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,

--
John

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Cell Programing

Thanks for reply,
I tried and didn't work. It gives formula error.
Again, I'm looking non-decimal figures.
For example, A1=4, A2= 6, so sum((A1+A2)/5) = 2; therefore the program
should show #2, if it was 2.45, I shouldn't show, since the result has
decimal points.
Thaks,

--
John


"OssieMac" wrote:

Hi John,

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2))

The above places a null value (which is represented by the double quotes) if
division by 5 does not return a whole number; otherwise will sum the range.

--
Regards,

OssieMac


"John Savy" wrote:

Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,

--
John

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Cell Programing

On Jan 25, 11:59*am, John Savy
wrote:
Thanks for reply,
I tried and didn't work. It gives formula error.
Again, I'm looking non-decimal figures.
For example, A1=4, A2= 6, so * sum((A1+A2)/5) = 2; therefore the program
should show #2, if it was 2.45, I shouldn't show, since the result has
decimal points.
Thaks,

--
John

"OssieMac" wrote:
Hi John,


=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2))


The above places a null value (which is represented by the double quotes) if
division by 5 does not return a whole number; otherwise will sum the range.


--
Regards,


OssieMac


"John Savy" wrote:


Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,


--
John


I think the formula of Ossie Mac is almost right except the false
condition.. The right formula should be :

=IF(MOD(SUM(A1:A2),5)0,"",(SUM(A1:A2)/5))

-Ayush Jain
http://groups.google.com/group/excel-macros
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Cell Programing

Hi again John,

I forgot to divide by 5 in the second part but should not have returned a
formula error; just the wrong answer. Try the following. Works fine in xl2002
and xl2007.

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2)/5)

If still returning an error, what version of xl are you using?

--
Regards,

OssieMac


"John Savy" wrote:

Thanks for reply,
I tried and didn't work. It gives formula error.
Again, I'm looking non-decimal figures.
For example, A1=4, A2= 6, so sum((A1+A2)/5) = 2; therefore the program
should show #2, if it was 2.45, I shouldn't show, since the result has
decimal points.
Thaks,

--
John


"OssieMac" wrote:

Hi John,

=IF(MOD(SUM(A1:A2),5)0,"",SUM(A1:A2))

The above places a null value (which is represented by the double quotes) if
division by 5 does not return a whole number; otherwise will sum the range.

--
Regards,

OssieMac


"John Savy" wrote:

Could you show me how to write this program:
if[sum((A1)+(A2))/5] would have decimal points then "blank", not to show
otherwise the result.
In other words I'm looking for the result without decimal point and if the
result has decimal point, it would be out of scop of the purpose, therefore
I'm not interested on the result.
Thanks,

--
John



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
VBA programing John Excel Programming 2 October 23rd 06 07:24 AM
Programing cell comments Neal Excel Programming 5 March 10th 06 10:12 PM
Programing help jaysphotos Excel Programming 4 December 6th 05 12:15 AM
VB programing Mestrella31 Excel Programming 3 October 11th 04 03:05 PM
Help with VBA programing CyberStorm Excel Programming 3 July 26th 04 07:57 PM


All times are GMT +1. The time now is 12:37 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"