Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default IF formula query - Help!!

=IF(OR(C20,D20,E20,F20,G20,K20,L20,O20),"o k","Error")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Sassie" wrote in message
...
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","Error",IF(K20,"ok","Error" ,IF(L20,"ok","Error",IF(O
20,"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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF formula query - Help!!

Thanks - that is great! you have been really helpful.

Cheers

Sassie

"Bob Phillips" wrote:

=IF(OR(C20,D20,E20,F20,G20,K20,L20,O20),"o k","Error")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Sassie" wrote in message
...
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","Error",IF(K20,"ok","Error" ,IF(L20,"ok","Error",IF(O
20,"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




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default IF formula query - Help!!

The OP said that he wanted ALL the cells to have a value before displaying
OK.

Try
=IF(OR(C2="",D2="",E2="",F2="",G2="",K2="",L2="",O 2=""),"Error","OK")
--
David Biddulph

"Bob Phillips" wrote in message
...
=IF(OR(C20,D20,E20,F20,G20,K20,L20,O20),"o k","Error")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Sassie" wrote in message
...
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","Error",IF(K20,"ok","Error" ,IF(L20,"ok","Error",IF(O
20,"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





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default IF formula query - Help!!

But his formula was definitely OR, and he seems happy. Sometimes you get
conflicting statements, so you take a punt. I took a punt.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"David Biddulph" wrote in message
...
The OP said that he wanted ALL the cells to have a value before displaying
OK.

Try
=IF(OR(C2="",D2="",E2="",F2="",G2="",K2="",L2="",O 2=""),"Error","OK")
--
David Biddulph

"Bob Phillips" wrote in message
...
=IF(OR(C20,D20,E20,F20,G20,K20,L20,O20),"o k","Error")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Sassie" wrote in message
...
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","Error",IF(K20,"ok","Error" ,IF(L20,"ok","Error",IF(O
20,"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









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
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

"contain a value or not (value could be figures/ dates or text)"

lets hope that the figure needed to be placed in any cell is non-negative
and place as hard figures (no source refs.)

happy holiday

=IF(OR(C2="",D2="",E2="",F2="",G2="",K2="",L2="",O 2=""),"Error","OK")


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Formula query ronnomad Excel Discussion (Misc queries) 2 November 16th 06 04:34 PM
"IF" Formula Query... Langoose Excel Worksheet Functions 2 May 15th 06 10:53 AM
"IF" Formula Query Langoose Excel Worksheet Functions 3 May 12th 06 11:18 AM
AHHHH-Get Data from Multiple Excel workbooks JAA149 Excel Discussion (Misc queries) 5 October 30th 05 05:19 PM


All times are GMT +1. The time now is 12:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"