Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need help with a formula. I need to format a column of cells so that if
the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can't do it through formatting.
If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What about this Custom Format?
[=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Or just plain old General????
I was answering a question that wasn't asked! I assumed that the OP wanted a fixed number of decimal places. "Rick Rothstein (MVP - VB)" wrote: What about this Custom Format? [=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
General by itself... yeah, that will work too.<g I don't know what I was
thinking either. For some reason, I thought I was going to need a multi-part pattern, which I had constructed, then I started to simplify it and never gave a moment's thought to General by itself. Isn't it amazing the blind spots we sometimes encounter? Rick "Dave Peterson" wrote in message ... Or just plain old General???? I was answering a question that wasn't asked! I assumed that the OP wanted a fixed number of decimal places. "Rick Rothstein (MVP - VB)" wrote: What about this Custom Format? [=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have no idea about what you write <vvbg.
"Rick Rothstein (MVP - VB)" wrote: General by itself... yeah, that will work too.<g I don't know what I was thinking either. For some reason, I thought I was going to need a multi-part pattern, which I had constructed, then I started to simplify it and never gave a moment's thought to General by itself. Isn't it amazing the blind spots we sometimes encounter? Rick "Dave Peterson" wrote in message ... Or just plain old General???? I was answering a question that wasn't asked! I assumed that the OP wanted a fixed number of decimal places. "Rick Rothstein (MVP - VB)" wrote: What about this Custom Format? [=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Of course, I didn't mean **you** when I said we. <g
Rick "Dave Peterson" wrote in message ... I have no idea about what you write <vvbg. "Rick Rothstein (MVP - VB)" wrote: General by itself... yeah, that will work too.<g I don't know what I was thinking either. For some reason, I thought I was going to need a multi-part pattern, which I had constructed, then I started to simplify it and never gave a moment's thought to General by itself. Isn't it amazing the blind spots we sometimes encounter? Rick "Dave Peterson" wrote in message ... Or just plain old General???? I was answering a question that wasn't asked! I assumed that the OP wanted a fixed number of decimal places. "Rick Rothstein (MVP - VB)" wrote: What about this Custom Format? [=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much. I guess I was trying to complicate it -- I never even
thought of General. I kept trying to find a formula. "Rick Rothstein (MVP - VB)" wrote: Of course, I didn't mean **you** when I said we. <g Rick "Dave Peterson" wrote in message ... I have no idea about what you write <vvbg. "Rick Rothstein (MVP - VB)" wrote: General by itself... yeah, that will work too.<g I don't know what I was thinking either. For some reason, I thought I was going to need a multi-part pattern, which I had constructed, then I started to simplify it and never gave a moment's thought to General by itself. Isn't it amazing the blind spots we sometimes encounter? Rick "Dave Peterson" wrote in message ... Or just plain old General???? I was answering a question that wasn't asked! I assumed that the OP wanted a fixed number of decimal places. "Rick Rothstein (MVP - VB)" wrote: What about this Custom Format? [=0]0;General Rick "Dave Peterson" wrote in message ... You can't do it through formatting. If you change your requirements (allow the decimal point on whole numbers), you could use a custom format of: #.# or #.## or #.### (or as many digits after the decimal place as you like) Vicki J. wrote: I need help with a formula. I need to format a column of cells so that if the number in a cell has a value after the decimal place (e.g.: 6.5), it displays the value (e.g: 6.5 -- no rounding up or down), BUT if there are only zeroes after the decimal place (e.g.: 6.0), the decimal and zeros are removed so that only the integer (e.g: 6) is showing. The numbers in the column will vary - some will have a value after the decimal, some will not. They are also added up and used in other formulas. Any help is appreciated. I've tried to search the formulas but can't see anything that would work. -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i get zeros to show after decimal point? | Excel Worksheet Functions | |||
decimal places and leading zeros | Excel Discussion (Misc queries) | |||
Leading decimal and zeros in formating numbers | Excel Discussion (Misc queries) | |||
Insert Decimal Places and Clear Zeros | Excel Discussion (Misc queries) | |||
Leading Zeros and decimal points | Excel Worksheet Functions |