Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Formula Modification

This formula works okay when cell U51 is either blank or
with data greater than zero; however, I now need to modify
the formula for the case when cell U51 has a zero posted
in it - so it returns a zero answer - with the other
features still intact.

=IF(U51<0,(U51-V42)/(P42-V42),"")

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Formula Modification

Your question is unclear as you missed two cases

What do you want when
1) U51<0 (negative value
1) U51 is not blank and not numeric. For example, U51 contains tex

Besides, your formula is wrong because you said the result is ok when
1) U51 greater than zero; an
2) U51 is blank

But your formula also deals with value smaller than zero
You should use U510 instead of U51<0

Please give more details. Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula Modification

If you are happy with it now, this should do what you want:

=IF(U51<0,(U51-V42)/(P42-V42),IF(U51="","",IF(U51=0,0,"")))

--
Regards,
Tom Ogilvy


"Phil Hageman" wrote in message
...
This formula works okay when cell U51 is either blank or
with data greater than zero; however, I now need to modify
the formula for the case when cell U51 has a zero posted
in it - so it returns a zero answer - with the other
features still intact.

=IF(U51<0,(U51-V42)/(P42-V42),"")



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Thanks

James, works just as I needed. Thanks for your time.
-----Original Message-----
try this:

=IF(U51="","",IF(U51<0,(U51-V42)/(P42-V42),0))

An if statement tests for 2 values, but you are testing
for 3, so a nested if should work.

James

-----Original Message-----
This formula works okay when cell U51 is either blank or
with data greater than zero; however, I now need to

modify
the formula for the case when cell U51 has a zero posted
in it - so it returns a zero answer - with the other
features still intact.

=IF(U51<0,(U51-V42)/(P42-V42),"")

.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Thanks

Tom, works just as I needed. Thanks for your time.
-----Original Message-----
If you are happy with it now, this should do what you

want:

=IF(U51<0,(U51-V42)/(P42-V42),IF(U51="","",IF

(U51=0,0,"")))

--
Regards,
Tom Ogilvy


"Phil Hageman"

wrote in message
...
This formula works okay when cell U51 is either blank or
with data greater than zero; however, I now need to

modify
the formula for the case when cell U51 has a zero posted
in it - so it returns a zero answer - with the other
features still intact.

=IF(U51<0,(U51-V42)/(P42-V42),"")



.

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
Formula modification yshridhar Excel Worksheet Functions 10 November 23rd 07 08:16 AM
Formula Modification No Name Excel Discussion (Misc queries) 2 May 1st 07 03:33 AM
Formula Modification No Name New Users to Excel 2 May 1st 07 03:33 AM
Formula Modification No Name Excel Worksheet Functions 2 May 1st 07 03:33 AM
Formula Modification Help Dmorri254 Excel Worksheet Functions 4 November 15th 04 07:06 PM


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