View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.newusers
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Calculated values in a cell

On Tue, 11 Nov 2008 22:16:20 -0500, "frankobl3" wrote:

=IF(AG3=5,"2008",IF(AG3=4,"2009",IF(AG3=3,"2010", IF(AG3=2,"2011",IF(AG3=1,"2012")))))


This looks as if it should return the same value as your formula:

=2013-AG3

Or, for error testing to be sure there is a valid number in AG3:

=if(and(ag3=1,ag3=5),2013-ag3,"ag3 has invalid value")

--ron