![]() |
Rounding to integers and adding plus sign
Hi, I have 2 problems
My first problem is that I have a large amount of data that I want to be rounded to the nearest integer value. What I have been using is "=INT(ROUND(Q795,2-(1+INT(LOG10(ABS(Q795))))))" to get it to 2 significant figures, and then to only take the integer value of that. It is having problems though since it will truncate numbers like 2.6 to 2 and I need them to be 3. My other problem is that I want some sort of formula to make a certain cell equal + if the number I am testing is positive... I'm not good with coding but something like If N160 then N15 = + also if you tell me the code can you please walk me through how to input that? Thanks a lot |
Rounding to integers and adding plus sign
Okay I found a way to get around the first part of my problem since it was
not needed anyway. Now all I need to know is how to make a cell equal "+" when the number in a different cell (say cell N16 is 0. If N16 is < 0 then I want the cell to equal nothing, or if that is not possible, I want it to equal "-" Thanks for any help ~Joe "Joe" wrote: Hi, I have 2 problems My first problem is that I have a large amount of data that I want to be rounded to the nearest integer value. What I have been using is "=INT(ROUND(Q795,2-(1+INT(LOG10(ABS(Q795))))))" to get it to 2 significant figures, and then to only take the integer value of that. It is having problems though since it will truncate numbers like 2.6 to 2 and I need them to be 3. My other problem is that I want some sort of formula to make a certain cell equal + if the number I am testing is positive... I'm not good with coding but something like If N160 then N15 = + also if you tell me the code can you please walk me through how to input that? Thanks a lot |
Rounding to integers and adding plus sign
Hi,
Try this in N15: =If(N160,"+","") Is this what you need? Regards - Dave. |
Rounding to integers and adding plus sign
Try this format and the numbers can be operated on.
Format, Number, Custom:= #,##0+;-#,##0 Regards Peter "Joe" wrote: Okay I found a way to get around the first part of my problem since it was not needed anyway. Now all I need to know is how to make a cell equal "+" when the number in a different cell (say cell N16 is 0. If N16 is < 0 then I want the cell to equal nothing, or if that is not possible, I want it to equal "-" Thanks for any help ~Joe "Joe" wrote: Hi, I have 2 problems My first problem is that I have a large amount of data that I want to be rounded to the nearest integer value. What I have been using is "=INT(ROUND(Q795,2-(1+INT(LOG10(ABS(Q795))))))" to get it to 2 significant figures, and then to only take the integer value of that. It is having problems though since it will truncate numbers like 2.6 to 2 and I need them to be 3. My other problem is that I want some sort of formula to make a certain cell equal + if the number I am testing is positive... I'm not good with coding but something like If N160 then N15 = + also if you tell me the code can you please walk me through how to input that? Thanks a lot |
Rounding to integers and adding plus sign
Thanks! this is exactly what I was looking for
"Dave" wrote: Hi, Try this in N15: =If(N160,"+","") Is this what you need? Regards - Dave. |
All times are GMT +1. The time now is 03:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com