Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stu Stu is offline
external usenet poster
 
Posts: 29
Default Plesae help: Excel function

Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Plesae help: Excel function

I tried it. It works. Maybe the cell is protected. Try testing it on a new
workbook. It works.

If you can't unprotect the cell, just type it manually, like
=SheetName!CellAddress, ie: =Sheet1!A1 for the 1st cell in Sheet1.

"Stu" wrote:

Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Plesae help: Excel function

Aw, sorry, reply to the wrong place. Tried you question also. But the sum
function will always return a value, like 0. I only know the macro approach
here. Which will not be as dynamic unless it is triggered using cell change
event.

Basically it is like this
sub macro1(row as long)
if Trim(Cell(row, "E").FormulaL1C1) < "" Then Cell(row, "A").FormulaL1C1
= Cell(row, "E").FormulaL1C1 - Cell(row, "D").FormulaL1C1
end sub

And put this macro in a worksheet change event.


"jchen" wrote:

I tried it. It works. Maybe the cell is protected. Try testing it on a new
workbook. It works.

If you can't unprotect the cell, just type it manually, like
=SheetName!CellAddress, ie: =Sheet1!A1 for the 1st cell in Sheet1.

"Stu" wrote:

Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 176
Default Plesae help: Excel function

The logic you explained contradicts what you are showing in your formula, to
"subtract E199 FROM D199" would yield D199 - E199 (not the other way around).
Your logic is also a little confusing so I'll first re-state what I think
you mean and the provide a formula. If this is incorrect re-post a little
clearer.

Cell F199 has the following formula: If E199 has a value greater than 0
then display D199 - E199, otherwise display blank:

=IF(E1990,D199-E199,"")

--
Regards,
Dave


"Stu" wrote:

Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Plesae help: Excel function

Hi, try this.
=IF(E199="", "", E199-D199)

"Stu" wrote:

Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default Plesae help: Excel function

Try this:

=IF(E1990,SUM(E199-D199),"")

"Stu" wrote in message
...
Can someone please tell me why this function does not work:

SUM(IF(E199"0",SUM(E199-D199)))

In case I have it all wrong, if I have a Value in cell E199 and I want to
subtract E199 from D199 provided that E199 has a value in it, if it does
not
then I want Cell F199 where my sum is to remain blank.

Hope someone can help me with this.

Many thanks in advance

Stu



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
IS THERE AN INTERPOLATION FUNCTION IN EXCEL 2003 Cooper Excel Worksheet Functions 2 December 23rd 05 04:51 AM
How do i execute a VBA function by clicking on an excel cell? Matthew Excel Discussion (Misc queries) 1 December 7th 05 01:10 AM
Excel 2003 Slow Function Argument Window [email protected] Excel Discussion (Misc queries) 2 June 28th 05 06:53 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM


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