View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sassie Sassie is offline
external usenet poster
 
Posts: 2
Default IF formula query - Help!!

I am trying to set up a formula which will validate if cells (non consecutive
cells) contain a value or not (value could be figures/ dates or text). If any
of the 9 cells do not contain a value then I want a value of "error" to
appear. If they all contain a value then I want a value of "OK" to be
displayed. This is what I have got from the knowledge base but I cannot get
this to work and I know I might have difficulty with the 9 statements as I
understand the maximum is 7. This is the formula I have been using:

=IF(C20,"ok","Error",IF(D20,"ok","Error",IF(E20 ,"ok","Error",IF(F20,"ok","Error",IF(G20,"ok","E rror",IF(K20,"ok","Error",IF(L20,"ok","Error",IF (O20,"ok","Error"))))))))

It works OK when the values returned after each statement are difference but
because I want an overall value of OK or Error (and each cell needs to be
validated on this basis) I think I am confusing it.

Can anyone help?

Thanks