ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If function (https://www.excelbanter.com/excel-worksheet-functions/19045-if-function.html)

Littlebird

If function
 
How can I do this ?

If d2=Refund then negate the value in e2.

ie make it a negative number

Cheers

Duke Carey

You can actually have VBA code run that will check column D's values and
change the sign in the corresponding value in column E. However, THAT IS A
BAD IDEA. It's usually important to preserve the original value, so you know
whether you've flipped the sign.

Assuming that you *should* keep the value in E2, then in F2 enter the formula:

=E2*IF(D2="Refund",-1,1)

"Littlebird" wrote:

How can I do this ?

If d2=Refund then negate the value in e2.

ie make it a negative number

Cheers



All times are GMT +1. The time now is 01:32 PM.

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