ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I have a column of 50 numbers (https://www.excelbanter.com/excel-worksheet-functions/247327-i-have-column-50-numbers.html)

Skip[_2_]

I have a column of 50 numbers
 
some are positive some are negative. I need to add +2 to the positive
numbers, and -2 to the negative numbers.
4 will become 6 and -12 become -14. I recieved help adding +1 and -1,
but now +2/-2 are needed. Thanks

David Biddulph[_2_]

I have a column of 50 numbers
 
=IF(A1<0,A1-2,IF(A10,A1+2,"I haven't said what I want to do if the original
number is zero"))
or, making a guess at your unspecified result,
=A1+2*SIGN(A1)
--
David Biddulph

"Skip" wrote in message
...
some are positive some are negative. I need to add +2 to the positive
numbers, and -2 to the negative numbers.
4 will become 6 and -12 become -14. I recieved help adding +1 and -1,
but now +2/-2 are needed. Thanks





All times are GMT +1. The time now is 11:56 PM.

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