ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup function (https://www.excelbanter.com/excel-worksheet-functions/24550-lookup-function.html)

Natalie

Lookup function
 
I have 2 columns of data: date(A) & % return(B). I want 2 new columns (C&D)
to to return both data from columns A & B "if and only if B is <0". How
should I set my function? Thank you

Ade P

You could use the if function to simply return blanks where B0.
=if( [condition] ,[result if true] , [result if false] )

In column C:
=if(colB<0,colA,"")

In column D:
=if(colB<0,colB,"")

This would give you a list but with blank spaces where column b0.

"Natalie" wrote:

I have 2 columns of data: date(A) & % return(B). I want 2 new columns (C&D)
to to return both data from columns A & B "if and only if B is <0". How
should I set my function? Thank you



All times are GMT +1. The time now is 11:17 AM.

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