Couple of examples that may help. If you give us more specific info then we can tailor our responses to meet your specific needs...
=IF(A2="YES",SUM(B1:B100),SUM(C1:C100))
=IF(A2="YES",MAX(B1:B100),MAX(C1:C100))
=IF(A2="YES",VLOOKUP(A3,B1:C100,2,0),VLOOKUP(A3,E1:F100,2,0))
All these assume that there is only a Yes/No answer. If more than this is possible then they would need to be changed like this:-
=IF(A2="YES",SUM(B1:B100),IF(A2="NO",SUM(C1:C100),"Other"))
Regards
Ken............
----------------------------------------------------------------------------
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
It's easier to beg forgiveness than ask permission
----------------------------------------------------------------------------