ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   function to return two different results (https://www.excelbanter.com/excel-discussion-misc-queries/158551-function-return-two-different-results.html)

Haz

function to return two different results
 
Hi I want a cell to return two different results depending on what is
entered. For example I want a function in column C (Outstanding) that will
either return the value of Col A (PO value) or it will return the difference
when a value is entered in col B ( Inv Value)

PO Value Invoice Value Outstanding

£1,417.05 1441.26 -£24.21
£635.21 319.37 £315.84

Any help here would be appreciated. Thanks





Kevin B

function to return two different results
 
Assuming you're working with columns A, B & C:

=IF(B1=0,A1,A1-B1)
--
Kevin Backmann


"Haz" wrote:

Hi I want a cell to return two different results depending on what is
entered. For example I want a function in column C (Outstanding) that will
either return the value of Col A (PO value) or it will return the difference
when a value is entered in col B ( Inv Value)

PO Value Invoice Value Outstanding

£1,417.05 1441.26 -£24.21
£635.21 319.37 £315.84

Any help here would be appreciated. Thanks





Haz

function to return two different results
 
Thank you it worked, Appreciated.

"Kevin B" wrote:

Assuming you're working with columns A, B & C:

=IF(B1=0,A1,A1-B1)
--
Kevin Backmann


"Haz" wrote:

Hi I want a cell to return two different results depending on what is
entered. For example I want a function in column C (Outstanding) that will
either return the value of Col A (PO value) or it will return the difference
when a value is entered in col B ( Inv Value)

PO Value Invoice Value Outstanding

£1,417.05 1441.26 -£24.21
£635.21 319.37 £315.84

Any help here would be appreciated. Thanks






All times are GMT +1. The time now is 02:36 PM.

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