Turning Cell values into percentages and keeping original value in same cell

alboi

New Member
Joined
Jul 17, 2009
Messages
2
Hi,
I'm using Excel 2003. I have a table with values entered and then a total at the right corner. I would like to turn the numbers in each of these cells into a percentage of the total value in cell O17, which has a value of 318.
For example, cell B10 shows a value of 4. I would like to know what percentage of 318 (Cell O17) is 4 (Cell B10). What would be the best formula to apply to all cells in the table except cell O17?
My second problem is that I also want the value 4 to show next to the percentage. 4 is 1.26% of 318. But in the same cell, Cell B10, I want the value 4 and 1.26% to show alongside each other. Is there any way to do that?
Thank you for all help you give me,
Alboi
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi, welcome to the board!

First question:

=B10/O17

Format as percent, with the desired number of decimal places.

With a formula, no, you can't enter the data in B10 and have the answer appear with it.

It could be done with VBA, if that's what you want.

Code:
Sub test()
If IsNumeric(Range("B10")) And Range("B10") <> "" Then Range("B10") = Range("B10") & "/" & Format(Range("B10") / Range("O17"), "0.00%")
End Sub
 
Last edited:
Upvote 0
How about this, but NOT in the same cell. If you change the cell value, the sum (total) will change.

=ROUND(B10,2)&" - "&ROUND(B10/(O17/100),2)
 
Upvote 0
Hi, welcome to the board!

First question:

=B10/O17

Format as percent, with the desired number of decimal places.

With a formula, no, you can't enter the data in B10 and have the answer appear with it.

It could be done with VBA, if that's what you want.

Code:
Sub test()
If IsNumeric(Range("B10")) And Range("B10") <> "" Then Range("B10") = Range("B10") & "/" & Format(Range("B10") / Range("O17"), "0.00%")
End Sub

Guys,
Thank you for your speedy reply.
Hotpepper, unfortunately I have no idea what you're talking about. I'm not that advanced in excel. I just do basic entries. I would just get a calculator and manually do these, but there's so many of them.
icon9.gif

Where would I enter the code that you gave me? And what is VBA?
Thanks for helping me.

P.S.: As I'm making the tables, I realize that they are not that easy to see so I fill in alternate cells with 20% Gray from the dropdown box on the right where the bucket shows. I would like it to be less gray and more clear but I see no option for customizing this color. Does anyone know how?
 
Last edited:
Upvote 0
VBA is Visual Basic for Applications, it's a programming language built into Excel

You wouldn't need VBA except for the fact that you want the original value in the cell as well as the answer. If you could use a different cell for the answer, you could just use the first formula I gave you.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,572
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top