ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Changing % to whole numbers (https://www.excelbanter.com/excel-discussion-misc-queries/159700-changing-%25-whole-numbers.html)

Lynda

Changing % to whole numbers
 
I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.


ExcelBanter AI

Answer: Changing % to whole numbers
 
To change a cell from a percentage to a whole number, follow these steps:
  1. Select the cell or range of cells that you want to change.
  2. Right-click on the selection and choose "Format Cells" from the menu.
  3. In the "Format Cells" dialog box, select "Number" from the list of categories.
  4. In the "Decimal places" field, enter "0" (zero).
  5. Click "OK" to apply the changes.

This should convert your percentages to whole numbers. For example, if you had a cell with the value "12%", it would now display as "12".

If you need to use this formula in your Excel sheet, you can wrap it in the [code] tag like this:
Code:

=A1*0.15
If you need to use a macro or Visual Basic code, you can wrap it in the
Formula:

and 

tags like this:

Formula:

Sub ConvertPercentToWholeNumber()
    
Selection.NumberFormat "0"
End Sub 

I hope that helps!

Ron Coderre

Changing % to whole numbers
 
Try this:

Put 100 in a blank cell and format that cell the way you want the converted
numbers to display (eg Number, 0 decimal places)

Copy the cell

Select the range of percent cells

<edit<paste special....Check: Multiply......Click [OK]
<edit<paste special....Check: Formats......Click [OK]

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


"Lynda" wrote in message
...
I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it
was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.




Mike H

Changing % to whole numbers
 
Lynda,

Put 100 in an empty cell and copy that cell. Select all your percentages and
then

Edit|Paste Special|Multiplt and click OK.
Delete the cell with 100 in

Mike


"Lynda" wrote:

I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.


JW[_2_]

Changing % to whole numbers
 
Several different ways. One way:
for no decimals:
=TEXT(A2*100,"0")
for decimals:
=TEXT(A2*100,"0.00")

Another way:
Enter 100 into a blank cell somewhere
Select the cell and copy it
Select the range containing the percentages
Edit--Paste Special
Under operation, select Multiply
Click OK

Lynda wrote:
I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.



Don Guillett

Changing % to whole numbers
 
One way
Sub makepercentwhole()
For Each c In Range("i3:i14")
If IsNumeric(c) Then c.Value = c * 100
c.NumberFormat = "0.00"
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Lynda" wrote in message
...
I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it
was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.



Lynda

Changing % to whole numbers
 
Thank you all so much for your help and prompt reply, I will be able to sleep
now.

"Lynda" wrote:

I have a number of very large spreadsheets all with percentages. I want to
change the cells from % to whole numbers. I did this the other day and it was
obviously something very simple (for me it has to be simple) but for some
reason I have gone completely brain dead and can't remember what I did.

My example is, say 12%.
When I change it to the number format I get 0.12. Obviously if I take away
the 2 decimal places I end up with 0. I want to end up with the number
displayed as 12.

Thanks in advance.



All times are GMT +1. The time now is 04:27 PM.

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