ENTER EXCEL FORMULA WITH MORE THAN 7 NESTED FUNCTIONS

L

Linda Bolton

I am entering and IF expression with more than 7 nested functions. Is there
another way to enter formula which would work?

=IF(AG6<6,AF6,IF(AG6=6,AF6-1,IF(AG6=7,AF6-2,IF(AG6=8,AF6-3,IF(AG6=9,AF6-4,IF(AG6=10,AF6-5,IF(AG6=11,AF6-6IF(AG6=12,AF6-7,IF(AG6=13,AF6-8,IF(AG6=14,AF6-9,IF(AG6>14,0))))))))))))
 
R

Ron Rosenfeld

On Fri, 14 Jan 2005 03:09:02 -0800, Linda Bolton <Linda
I am entering and IF expression with more than 7 nested functions. Is there
another way to enter formula which would work?

=IF(AG6<6,AF6,IF(AG6=6,AF6-1,IF(AG6=7,AF6-2,IF(AG6=8,AF6-3,IF(AG6=9,AF6-4,IF(AG6=10,AF6-5,IF(AG6=11,AF6-6IF(AG6=12,AF6-7,IF(AG6=13,AF6-8,IF(AG6=14,AF6-9,IF(AG6>14,0))))))))))))


You can not nest more than seven functions in Excel, so a different approach
must be used.

If AG6 will always be an integer, then:

=AF6+MAX(-9,MIN(0,5-AG6))

should give the equivalent result.

If AG6 might not always be an integer, then you need to post back with what you
would like to do in that event.


--ron
 
B

Bob Phillips

Hi Linda,

You can't do that, as you see, but try this formula

=IF(AF6>14,0,IF(AF6<6,AF6,AF6-MATCH(AG6-5,{1,2,3,4,5,6,7,8,9},0)))

--
HTH

-------

Bob Phillips
Linda Bolton said:
I am entering and IF expression with more than 7 nested functions. Is there
another way to enter formula which would work?
=IF(AG6<6,AF6,IF(AG6=6,AF6-1,IF(AG6=7,AF6-2,IF(AG6=8,AF6-3,IF(AG6=9,AF6-4,IF
(AG6=10,AF6-5,IF(AG6=11,AF6-6IF(AG6=12,AF6-7,IF(AG6=13,AF6-8,IF(AG6=14,AF6-9
,IF(AG6>14,0))))))))))))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top