ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If - Then question (https://www.excelbanter.com/excel-worksheet-functions/252486-if-then-question.html)

ksean

If - Then question
 
How would I write a formula to handle this problem?
If the value in cell D20 is €˜U18 then the result in cell D6 is a €˜0
however if the value in D20 is anything else then the result in cell D6 is
the value in N5


T. Valko

If - Then question
 
Try this entered in D6:

=IF(D20="U18",0,N5)

Or:

Assuming N5 is a numeric value.

=(D20<"U18")*N5

--
Biff
Microsoft Excel MVP


"Ksean" wrote in message
...
How would I write a formula to handle this problem?
If the value in cell D20 is 'U18' then the result in cell D6 is a '0'
however if the value in D20 is anything else then the result in cell D6 is
the value in N5




ksean

If - Then question
 
I went with your second option and it worked great!

Thanks.


"T. Valko" wrote:

Try this entered in D6:

=IF(D20="U18",0,N5)

Or:

Assuming N5 is a numeric value.

=(D20<"U18")*N5

--
Biff
Microsoft Excel MVP


"Ksean" wrote in message
...
How would I write a formula to handle this problem?
If the value in cell D20 is 'U18' then the result in cell D6 is a '0'
however if the value in D20 is anything else then the result in cell D6 is
the value in N5



.


T. Valko

If - Then question
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Ksean" wrote in message
...
I went with your second option and it worked great!

Thanks.


"T. Valko" wrote:

Try this entered in D6:

=IF(D20="U18",0,N5)

Or:

Assuming N5 is a numeric value.

=(D20<"U18")*N5

--
Biff
Microsoft Excel MVP


"Ksean" wrote in message
...
How would I write a formula to handle this problem?
If the value in cell D20 is 'U18' then the result in cell D6 is a '0'
however if the value in D20 is anything else then the result in cell D6
is
the value in N5



.





All times are GMT +1. The time now is 05:12 PM.

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