Thread: IF function
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default IF function

Try something like this:

With
A2: (a date)

B2:
=LOOKUP(TODAY()-A2,{-100000,0,366},{"ASSESSMENT PLANNED FOR THIS YEAR BUT
NOT CARRIED OUT","ASSESSMENT CARRIED OUT THIS YEAR","ASSESSMENT NOT PLANNED
OR FAILED TO HAPPEN"})

or

Build this table on another worksheet or in a blank range on the current
sheet.
(I'll assume it's on the current sheet in cells Y1:Z3
-100000 ASSESSMENT PLANNED FOR THIS YEAR BUT NOT CARRIED OUT
0 ASSESSMENT CARRIED OUT THIS YEAR
366 ASSESSMENT NOT PLANNED OR FAILED TO HAPPEN

Then
B2: =LOOKUP(TODAY()-A2,$Y$1:$Y$3,$Z$1:$Z$3)

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"Pasty" wrote:

This is the formula to calculate if assessments have happened, going to
happened or hasn't happened

=IF(NOW()-AF2=0<365,"ASSESSMENT CARRIED OUT THIS
YEAR",IF(NOW()-AF2<0,"ASSESSMENT PLANNED FOR THIS YEAR BUT NOT CARRIED
OUT",IF(NOW()-AF2365,"ASSESSMENT NOT PLANNED OR FAILED TO HAPPEN",)))

Every time I change the figure to test the function the response is
"ASSESSMENT CARRIED OUT THIS YEAR" regardless of the figure it's working out.

Where am I going wrong?