View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default automatic age range formula

=IF(A165,"65",FLOOR(A1-1^-10,5)&"-"&CEILING(A1,5))
--
David Biddulph

"tjb" wrote in message
...
In cell A1, I have a formula giving me a number 31.
In cell B1, I need to enter text saying "30-35"

This formula needs to change based on the content of cell A1. For
example,
if A1 said 20, then B1 should read "15-20", if A1 said 67, then B1 should
read "65" and so on.

I know this is possible but I've forgotten the formula. Thanks all!