ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function writing help (https://www.excelbanter.com/excel-worksheet-functions/222792-function-writing-help.html)

gator

Function writing help
 
Trying to figure out how to write a function for the following issue:
I want to have a cell that reads from another (first) cell the number and
then report action based on the number in the first cell. It needs to
consider first if the cell has a 0 in it should then report a 0, If it is
not a 0 it then needs to run the equation 269.9+(9.538*F7). The function
I have at this point is =IF(D7=0, "0","269.9+(9.538*F7)") the problem is
that the first part works and it reports 0 as it should but if I put
another number in get the equation printed rather than it running the
equation.


T. Valko

Function writing help
 
"=IF(D7=0, "0","269.9+(9.538*F7)")"

Remove *all* the quotes from the formula:

=IF(D7=0,0,269.9+9.538*F7)

--
Biff
Microsoft Excel MVP


"Gator" wrote in message
...
Trying to figure out how to write a function for the following issue:
I want to have a cell that reads from another (first) cell the number and
then report action based on the number in the first cell. It needs to
consider first if the cell has a "0" in it should then report a "0", If it
is
not a "0" it then needs to run the equation "269.9+(9.538*F7)". The
function
I have at this point is "=IF(D7=0, "0","269.9+(9.538*F7)")" the problem is
that the first part works and it reports "0" as it should but if I put
another number in get the equation printed rather than it running the
equation.




Mike H

Function writing help
 
Hi,

Ditch the quotes around the numbers is making them text

=IF(D7=0, 0,269.9+(9.538*F7))

Mike

"Gator" wrote:

Trying to figure out how to write a function for the following issue:
I want to have a cell that reads from another (first) cell the number and
then report action based on the number in the first cell. It needs to
consider first if the cell has a 0 in it should then report a 0, If it is
not a 0 it then needs to run the equation 269.9+(9.538*F7). The function
I have at this point is =IF(D7=0, "0","269.9+(9.538*F7)") the problem is
that the first part works and it reports 0 as it should but if I put
another number in get the equation printed rather than it running the
equation.



All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com