ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format to a negative value (https://www.excelbanter.com/excel-worksheet-functions/76423-format-negative-value.html)

kharrison

Format to a negative value
 
I have two columns of data. The first column contains either the text L or
P. The 2nd column is a percentage value. What I wish to do is if the first
column is L then format the percentage value to a negative. If P leave as is.

Can this be done.

Any help would be much appreciated.

Max

Format to a negative value
 
"kharrison" wrote:
I have two columns of data. The first column contains either the text L

or
P. The 2nd column is a percentage value. What I wish to do is if the

first
column is L then format the percentage value to a negative. If P leave as

is.

One way ..

Assuming the 2 cols are cols A and B, data from row1 down
Put in C1: =IF(A1="","",IF(A1="L",-B1,IF(A1="P",B1,"")))
Format C1 as percentage, copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



kharrison

Format to a negative value
 
Max

You're a genius. Thanks - it worked perfectly.

Cheers

"Max" wrote:

"kharrison" wrote:
I have two columns of data. The first column contains either the text L

or
P. The 2nd column is a percentage value. What I wish to do is if the

first
column is L then format the percentage value to a negative. If P leave as

is.

One way ..

Assuming the 2 cols are cols A and B, data from row1 down
Put in C1: =IF(A1="","",IF(A1="L",-B1,IF(A1="P",B1,"")))
Format C1 as percentage, copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




Max

Format to a negative value
 
Glad it worked for you !
Thanks for the feedback ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"kharrison" wrote in message
...
Max

You're a genius. Thanks - it worked perfectly.

Cheers





All times are GMT +1. The time now is 10:31 AM.

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