ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Trouble with a conditional statement (https://www.excelbanter.com/new-users-excel/21357-trouble-conditional-statement.html)

Jim

Trouble with a conditional statement
 
Hi everyone - hope someone can help.

I have a form made up for employees to use as a purchase order.

Depending on the type of purchase order, they are to put an X in either cell
F7, F8, or F9.

When the purchase order totals the page, it is then set to figure the
discount available, based on the type of order specified by the employee.

The formula I have entered is =IF(F7=X,J23*0.02,J23). What I want the
formula to do is look at cell F7. If the employee has entered an X in that
cell, the formula should then take the number in cell J23 and multipyy it by
..02. If cell F7 is empty, the formula should return the full value of cell
J23.

Excel says that it is looking for a #Name? on the logical test line of the
formula box.

What am I doing wrong?

Thanks
--
Jim

Ron Coderre

The X in your formula need to be "X":
=IF(F7="X",J23*0.02,J23)

In quotes, Excel treats it as the letter X. Without quotes, Excel is
looking for a range named X.

Regards,
Ron


Jim

Thanks Ron.

That fixed the problem. I knew it had to be something simple, but I sure
couldn't find the answer in the Help section.

Jim

"Ron Coderre" wrote:

The X in your formula need to be "X":
=IF(F7="X",J23*0.02,J23)

In quotes, Excel treats it as the letter X. Without quotes, Excel is
looking for a range named X.

Regards,
Ron



All times are GMT +1. The time now is 08:53 PM.

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