Andy,
Try this in E1.
=IF(D10,E2-D1,IF(C10,E2-C1,IF(B10,E2-B1,E2)))
This will work backwards from D1:B1 meaning if the first argument is
met (D10) then it will always return the difference of E2-D1, even if
C1 or B1 are greater then 0.
Cheers,
Steve
--
SteveG
------------------------------------------------------------------------
SteveG's Profile:
http://www.excelforum.com/member.php...fo&userid=7571
View this thread:
http://www.excelforum.com/showthread...hreadid=488796