View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default Conditional Formulas

RESTATED as: If a number in cell A1 is between 1-15 then I need cell B1 to
equal 1, if the number is between 16-30 I need it to equal 2, if the number
is 31-45 I need it to equal 3, if the number is 46-60 I need it to equal 4,
if the number is between 61-75 I need it to equal 5, so on and so fourth.

You could write a nice long IF statement, or use a lookup function; both are
considered 'conditional'

But this is the simplest solution I can think of :
If you number is in A1 then use =CEILING(A1,15)/15
This is not really "conditional" but serves your purpose

BUT this assume that A1 hold a simple number 1, 16, 35
If A1 holds time (0:01, 0:16, 0:35( then change the formula to
=CEILING(A1*24*60,15)/15
Excel stores time as a fraction of a day (we multiple this fraction by 24 to
get hours and again by 60 to get minutes)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Wendy" wrote in message
...
I need to know how I would write the formula for this function, if anyone
could help me that would be wonderful

If a number in a cell is between 1-15 then I need it in another cell to
only
equal 1, if the number is between 16-30 I need it to equal 2, if the
number
is 31-45 I need it to equal 3, if the number is 46-60 I need it to equal
4,
if the number is between 61-75 I need it to equal 5, so on and so fourth.

These are 15 minutes increments of time. hard to explain, but in one cell
will be the time in minutes for example 18 minutes, in another cell will
be
number that is a base unit for example 5. I need the number in the third
cell
to be the base number of units which is 5, and the time units from the
other
cell which since it is 18 would actually equal two time units, so 18=2,
then
the total number in the third cell will be 7 (5+2=7), but I need the
spreadsheet to calculate the Time minutes of 18 into two units of time.
Can
anyone help me with this one is seems complicated.
Thank you so much