#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default IF and AND

I need to create a formula that has an IF condition and an AND condition.
This is what I would ultimately like: =IF(AND(B48,B4-8,C4="")B48,B4-8,0)

It needs to look at cell B4 figure out if it is greater than 8 then subtract
8 from B4 but only if it cell C4 is blank. If C4 is not blank it needs leave
the value from cell B4 alone.

Can you help?

Thanks! :)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default IF and AND

One way:

=B4-IF(AND(B48,C4=""),8,0)

or, equivalently

=B4-IF(OR(B4<=8,C4<""),0,8)

or, equivalently

=B4-8*AND(B48,C4="")

or, equivalently

=B4-8*(B48)*(C4="")

In article ,
Ashley wrote:

I need to create a formula that has an IF condition and an AND condition.
This is what I would ultimately like: =IF(AND(B48,B4-8,C4="")B48,B4-8,0)

It needs to look at cell B4 figure out if it is greater than 8 then subtract
8 from B4 but only if it cell C4 is blank. If C4 is not blank it needs leave
the value from cell B4 alone.

Can you help?

Thanks! :)

  #3   Report Post  
Posted to microsoft.public.excel.programming
RWN RWN is offline
external usenet poster
 
Posts: 104
Default IF and AND

How about;

=IF(AND(B48,C4=""),B4-8,0)

--
Regards;
Rob
------------------------------------------------------------------------
"Ashley" wrote in message
...
I need to create a formula that has an IF condition and an AND condition.
This is what I would ultimately like: =IF(AND(B48,B4-8,C4="")B48,B4-8,0)

It needs to look at cell B4 figure out if it is greater than 8 then subtract
8 from B4 but only if it cell C4 is blank. If C4 is not blank it needs leave
the value from cell B4 alone.

Can you help?

Thanks! :)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default IF and AND

Excel doesn't like circular references, so I'm not sure you can change
the value of B4 based on an evaluation of B4.

Perhaps you could put the following formula in any other clear cell and
then base the rest of your calculations of that reference?
=IF(AND(B48,C4="",B4-8,"B4")

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default IF and AND

Try this

=IF(((B48)*(C4="")),B4-8,0) it works according to your specifications.

Jerry

"Ashley" wrote in message
...
I need to create a formula that has an IF condition and an AND condition.
This is what I would ultimately like: =IF(AND(B48,B4-8,C4="")B48,B4-8,0)

It needs to look at cell B4 figure out if it is greater than 8 then
subtract
8 from B4 but only if it cell C4 is blank. If C4 is not blank it needs
leave
the value from cell B4 alone.

Can you help?

Thanks! :)



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



All times are GMT +1. The time now is 05:09 PM.

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

About Us

"It's about Microsoft Excel"