PDA

View Full Version : Solved: Formula For based on blanks



farrukh
07-11-2012, 08:53 AM
Hello All


I need a formula if cell b42,d42,e42, j42 is empty then c42 will be empty other wise c42 value.



Thanks
farrukh

Bob Phillips
07-11-2012, 09:16 AM
Try

=IF(OR(B42="",D42="",E42="",J42=""),"",some_value)

Aussiebear
07-11-2012, 03:56 PM
I need a formula if cell b42,d42,e42, j42 is empty then c42 will be empty other wise c42 value.
Just to clarify your request here, are you looking at:

If either cell B42, or D42, or E42 , or J42 is empty then C42 will be empty, or If all cells B42, and D42, and E42, and J42 are empty then C42 will be empty?

farrukh
07-11-2012, 09:47 PM
Aussiebear/xld

Iam sorry i dont clear in post i need the if all the cells are empty then empty if suppose value in B42 then dont empty the cell C42 . I mean in
or D42, or E42 , or J42,or J42 if any value in any cells exist so dont empty the cell. If value exist then get the value of L42 to C42.


Thanks
Farrukh

Bob Phillips
07-11-2012, 11:04 PM
Still not sure I get it

=IF(SUM(COUNTIF(OFFSET(B42,0,{0,2,3,8}),"<>")),some_value,"")

farrukh
07-11-2012, 11:43 PM
Hi xld,


I attached the workbook in A42 i nee formula I highligted the rows in which data not show in column A ?


Thanks
Farrukh

Aussiebear
07-12-2012, 02:11 AM
There is no data in Column A what so ever.

In which cell does the formula reside?

Am I correct in assuming that the formula IF any of the cells, B42, D42, E42, J42 are blank, then C42 is blank, else C42 equals L42 is correct?

farrukh
07-12-2012, 02:32 AM
The formula reside in A42. If all the cells B42, D42, E42, J42 are empty (null) then A42 is null if any one cell has a value or string then in A42 get the value of L42.

Sorry i am not understaning well to you.

Aussiebear
07-12-2012, 03:28 AM
Try the following then:
=If(AND(B42<>"",D42<>"",E42<>"",J42<>"",L42,""))

farrukh
07-12-2012, 04:28 AM
Aussiebear,

Thanks you very much it works... I little change the syntax to work.




=IF(OR(B42<>"",D42<>"",E42<>"",J42<>""),L42,"")



Best regards
farrukh

Simon Lloyd
07-12-2012, 11:34 AM
Crossposted here http://www.thecodecage.com/forumz/showthread.php?p=1055001092#post1055001092

@Farruk, you are not new to these formus and should be well aware on our policies on crossposting, please read the first link in my signature line below!

Aussiebear
07-12-2012, 04:20 PM
The formula reside in A42. If all the cells B42, D42, E42, J42 are empty (null) then A42 is null if any one cell has a value or string then in A42 get the value of L42.

This was the issue in your description. When you say initially "If all the cells B42, D42, E42, J42 are empty (null) then A42 is null" means the required use of AND in the formula. However you next go on to say," if any one cell has a value or string then in A42 get the value of L42" which requires the use of OR in the formula. By asking for two different things caused confusion.

farrukh
07-12-2012, 09:41 PM
Simon Lloyd/Aussiebear


I extremly apologize for cross post :mkay next time i should obey the rules.

Sorry you both.


Thanks
farrukh

Aussiebear
07-13-2012, 01:53 AM
Thank you farrukh, cross posting is a modern problem, with everyone wanting a solution right now. We simply need to be patient. Did you understand my point that I raised in the previous post?