Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jonibenj
 
Posts: n/a
Default Problem with IF statement


I have the following set-up with 3 cells:

A1 - a target percentage value (30.00%)

A2 - the actual value

A3 - the deviation

Each cell is formatted for percentages. I have inserted the following
formula into A3:

=IF(ISBLANK(A2),"",IF(A2<30,"",A2-A1)

The formula is supposed to do either of three things:

1. If there is no value in A2, leave A3 blank.
2. If the actual percentage is 30% or lower, leave A3 blank.
3. If the actual percentage is over 30%, calculate the deviation from
the standard.

However, The fromula is not behaving! No matter what I do, the A3 cell
remains blank! What have I done wrong???

Jonathan.


--
Jonibenj
------------------------------------------------------------------------
Jonibenj's Profile: http://www.excelforum.com/member.php...o&userid=17048
View this thread: http://www.excelforum.com/showthread...hreadid=396355

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Use A2="" instead of isblank, isblank only works if the cell is empty
maybe you have a formula in A2? This would be a shorter way

=IF(OR(A2="",A2<30%),"",A2-A1)

--
Regards,

Peo Sjoblom

(No private emails please)


"Jonibenj" wrote in
message ...

I have the following set-up with 3 cells:

A1 - a target percentage value (30.00%)

A2 - the actual value

A3 - the deviation

Each cell is formatted for percentages. I have inserted the following
formula into A3:

=IF(ISBLANK(A2),"",IF(A2<30,"",A2-A1)

The formula is supposed to do either of three things:

1. If there is no value in A2, leave A3 blank.
2. If the actual percentage is 30% or lower, leave A3 blank.
3. If the actual percentage is over 30%, calculate the deviation from
the standard.

However, The fromula is not behaving! No matter what I do, the A3 cell
remains blank! What have I done wrong???

Jonathan.


--
Jonibenj
------------------------------------------------------------------------
Jonibenj's Profile:
http://www.excelforum.com/member.php...o&userid=17048
View this thread: http://www.excelforum.com/showthread...hreadid=396355


  #3   Report Post  
BenjieLop
 
Posts: n/a
Default


Jonibenj Wrote:
I have the following set-up with 3 cells:

A1 - a target percentage value (30.00%)

A2 - the actual value

A3 - the deviation

Each cell is formatted for percentages. I have inserted the following
formula into A3:

=IF(ISBLANK(A2),"",IF(A2<30,"",A2-A1)

The formula is supposed to do either of three things:

1. If there is no value in A2, leave A3 blank.
2. If the actual percentage is 30% or lower, leave A3 blank.
3. If the actual percentage is over 30%, calculate the deviation from
the standard.

However, The fromula is not behaving! No matter what I do, the A3 cell
remains blank! What have I done wrong???

Jonathan.


Try this ...

=IF(OR(ISBLANK(A2),A2<0.3),\"\",A2-A1)

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=396355

  #4   Report Post  
Rowan
 
Posts: n/a
Default

try

=IF(ISBLANK(A2),"",IF(A2<0.3,"",A2-A1))

or in a neater format

=IF(OR(ISBLANK(A2),A2<0.3),"",A2-A1)

Hope this helps
Rowan

"Jonibenj" wrote:


I have the following set-up with 3 cells:

A1 - a target percentage value (30.00%)

A2 - the actual value

A3 - the deviation

Each cell is formatted for percentages. I have inserted the following
formula into A3:

=IF(ISBLANK(A2),"",IF(A2<30,"",A2-A1)

The formula is supposed to do either of three things:

1. If there is no value in A2, leave A3 blank.
2. If the actual percentage is 30% or lower, leave A3 blank.
3. If the actual percentage is over 30%, calculate the deviation from
the standard.

However, The fromula is not behaving! No matter what I do, the A3 cell
remains blank! What have I done wrong???

Jonathan.


--
Jonibenj
------------------------------------------------------------------------
Jonibenj's Profile: http://www.excelforum.com/member.php...o&userid=17048
View this thread: http://www.excelforum.com/showthread...hreadid=396355


  #5   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Could be.....

Each cell is formatted for percentages


So, in your formula:

IF(A2<30

If A2 is formatted as PERCENTAGE then the cell will DISPLAY 30% but the true
underlying value is actually 0.3.....

So....

IF(A2<30 = TRUE = ""

Change the formula to:

=IF(ISBLANK(A2),"",IF(A2<0.3,"",A2-A1)

OR

=IF(ISBLANK(A2),"",IF(A2<30%,"",A2-A1)

Biff

"Jonibenj" wrote in
message ...

I have the following set-up with 3 cells:

A1 - a target percentage value (30.00%)

A2 - the actual value

A3 - the deviation

Each cell is formatted for percentages. I have inserted the following
formula into A3:

=IF(ISBLANK(A2),"",IF(A2<30,"",A2-A1)

The formula is supposed to do either of three things:

1. If there is no value in A2, leave A3 blank.
2. If the actual percentage is 30% or lower, leave A3 blank.
3. If the actual percentage is over 30%, calculate the deviation from
the standard.

However, The fromula is not behaving! No matter what I do, the A3 cell
remains blank! What have I done wrong???

Jonathan.


--
Jonibenj
------------------------------------------------------------------------
Jonibenj's Profile:
http://www.excelforum.com/member.php...o&userid=17048
View this thread: http://www.excelforum.com/showthread...hreadid=396355





  #6   Report Post  
Jonibenj
 
Posts: n/a
Default


Thanks a lot guys, I got it to work!! :)

Jonathan


--
Jonibenj
------------------------------------------------------------------------
Jonibenj's Profile: http://www.excelforum.com/member.php...o&userid=17048
View this thread: http://www.excelforum.com/showthread...hreadid=396355

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
IF Statement Problem Bryan Excel Worksheet Functions 5 July 29th 05 04:10 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 3 May 17th 05 03:42 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 4 May 12th 05 09:34 PM
IF statement problem simon Excel Worksheet Functions 1 December 30th 04 10:59 AM
IF statement problem Kalabalana Excel Worksheet Functions 4 November 24th 04 08:37 PM


All times are GMT +1. The time now is 07:22 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"