how to insert function?

T

tmela

if cell h4>=16, subtract 15, if cell h4>=31 subtract 30,if cell h4>=4
subtract 45
does any one know if all this can be included in one formula?
Many thanks in anticipation of your repl
 
D

Dave Peterson

It looks like you want the remainder after dividing by 15.

If that's true:

=mod(H4,15)
 
R

Rookie 1st class

=IF(H4>=46,H4-45,IF(H4>=31,H4-30,IF(H4>=16,H4-15,H4))) ' pasted into A1 the
result in A1 is what you wanted tmela.
 
R

Rookie 1st class

This type if statements must be run backwards. The lowest statement is met
every time the highest statement is met, therefore you must test from highest
to lowest.
 
Top