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

how do i get this logic to work. if x30 and ends with .00 then (basically i
want it to give me the result of 24.00 etc but not 24.21
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default if formula

I think the INT function is what you're looking for. It will strip off the
decimal portion of a number, leaving only the Integer portion. See if this
works for you:

=IF(A130,INT(A1),0)

This basically states, if A1 (or X) is greater than 30, then return the
integer portion of A1. Since you didn't specifiy what you wanted to happen
if x<30, I just have it returning 0.

Hopefully this will at least point you in the right direction. Post back
with more details if you need more help.

HTH,
Elkar


"Ann" wrote:

how do i get this logic to work. if x30 and ends with .00 then (basically i
want it to give me the result of 24.00 etc but not 24.21

  #3   Report Post  
Posted to microsoft.public.excel.misc
ann ann is offline
external usenet poster
 
Posts: 210
Default if formula

here's the formula. if x <30 and ends in .00 then return x otherwise return
0. so if x=24.24 then return 0. if x = 24.00, then return 24. i want it to
read the .xx portion and return a number if its an integer. on the right
track, but not completely.

"Elkar" wrote:

I think the INT function is what you're looking for. It will strip off the
decimal portion of a number, leaving only the Integer portion. See if this
works for you:

=IF(A130,INT(A1),0)

This basically states, if A1 (or X) is greater than 30, then return the
integer portion of A1. Since you didn't specifiy what you wanted to happen
if x<30, I just have it returning 0.

Hopefully this will at least point you in the right direction. Post back
with more details if you need more help.

HTH,
Elkar


"Ann" wrote:

how do i get this logic to work. if x30 and ends with .00 then (basically i
want it to give me the result of 24.00 etc but not 24.21

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default if formula

Hi Ann

Maybe
=IF(A130,0,IF(A1=INT(A1),A1,0)

--
Regards

Roger Govier


"Ann" wrote in message
...
here's the formula. if x <30 and ends in .00 then return x otherwise
return
0. so if x=24.24 then return 0. if x = 24.00, then return 24. i
want it to
read the .xx portion and return a number if its an integer. on the
right
track, but not completely.

"Elkar" wrote:

I think the INT function is what you're looking for. It will strip
off the
decimal portion of a number, leaving only the Integer portion. See
if this
works for you:

=IF(A130,INT(A1),0)

This basically states, if A1 (or X) is greater than 30, then return
the
integer portion of A1. Since you didn't specifiy what you wanted to
happen
if x<30, I just have it returning 0.

Hopefully this will at least point you in the right direction. Post
back
with more details if you need more help.

HTH,
Elkar


"Ann" wrote:

how do i get this logic to work. if x30 and ends with .00 then
(basically i
want it to give me the result of 24.00 etc but not 24.21



  #5   Report Post  
Posted to microsoft.public.excel.misc
ann ann is offline
external usenet poster
 
Posts: 210
Default if formula

that works, thanks!! i think the other one did too, but i didn't understand
it, now i do. thanks!

"Roger Govier" wrote:

Hi Ann

Maybe
=IF(A130,0,IF(A1=INT(A1),A1,0)

--
Regards

Roger Govier


"Ann" wrote in message
...
here's the formula. if x <30 and ends in .00 then return x otherwise
return
0. so if x=24.24 then return 0. if x = 24.00, then return 24. i
want it to
read the .xx portion and return a number if its an integer. on the
right
track, but not completely.

"Elkar" wrote:

I think the INT function is what you're looking for. It will strip
off the
decimal portion of a number, leaving only the Integer portion. See
if this
works for you:

=IF(A130,INT(A1),0)

This basically states, if A1 (or X) is greater than 30, then return
the
integer portion of A1. Since you didn't specifiy what you wanted to
happen
if x<30, I just have it returning 0.

Hopefully this will at least point you in the right direction. Post
back
with more details if you need more help.

HTH,
Elkar


"Ann" wrote:

how do i get this logic to work. if x30 and ends with .00 then
(basically i
want it to give me the result of 24.00 etc but not 24.21




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 03:57 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"