#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ann ann is offline
external usenet poster
 
Posts: 210
Default if then formula

my logic isn't working here. i have if a1=multiple of 60, then return a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120, 180
etc...or i can hard code these since it's only up to 360.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default if then formula

=if(mod(a1,60)=0,a1,0)
or equivalently
=a1*(mod(a1,60)=0)

Ann wrote:

my logic isn't working here. i have if a1=multiple of 60, then return a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120, 180
etc...or i can hard code these since it's only up to 360.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default if then formula

Try this:

=IF(MOD(A1,60),0,A1)

Biff

"Ann" wrote in message
...
my logic isn't working here. i have if a1=multiple of 60, then return a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120,
180
etc...or i can hard code these since it's only up to 360.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ann ann is offline
external usenet poster
 
Posts: 210
Default if then formula

perfect, that worked! thanks again

"T. Valko" wrote:

Try this:

=IF(MOD(A1,60),0,A1)

Biff

"Ann" wrote in message
...
my logic isn't working here. i have if a1=multiple of 60, then return a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120,
180
etc...or i can hard code these since it's only up to 360.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default if then formula

Try this entered in B1

=IF(INT(A1/60=INT(A1/60)),A1,0)


Gord Dibben MS Excel MVP


On Mon, 25 Jun 2007 14:22:00 -0700, Ann wrote:

my logic isn't working here. i have if a1=multiple of 60, then return a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120, 180
etc...or i can hard code these since it's only up to 360.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default if then formula

You're welcome. Thanks for the feedback!

Biff

"Ann" wrote in message
...
perfect, that worked! thanks again

"T. Valko" wrote:

Try this:

=IF(MOD(A1,60),0,A1)

Biff

"Ann" wrote in message
...
my logic isn't working here. i have if a1=multiple of 60, then return
a1
otherwise return 0. can i do a "multiple of 60? - for example 60, 120,
180
etc...or i can hard code these since it's only up to 360.






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



All times are GMT +1. The time now is 09:45 PM.

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

About Us

"It's about Microsoft Excel"