Hey guys,
I have a bunch of numbers formatted as either a percent or general. If the cell is percent formatted, I want to multiply it by 100.
Do I have to use VBA? If so, real quick, what is the relavent code I should be using?
Thanks in advance!
Hey guys,
I have a bunch of numbers formatted as either a percent or general. If the cell is percent formatted, I want to multiply it by 100.
Do I have to use VBA? If so, real quick, what is the relavent code I should be using?
Thanks in advance!
In the end, I want to be able to write a function where FUNCTION(CELL) returns the value of the cell*100 if the cell is % formatted, and just the value if not.
Thanks!
Hi Demont81,Originally Posted by Dermot81
If I understand correctly, you want all cells formatted as a % to become whole numbers instead? If so, type 100 (General Format) in a cell somewhere, copy it, then select all the % cells and Paste Special > Multiply
Hope this is what you want
oldchippy![]()
in B1Originally Posted by Dermot81
=findpc(A1)
in Module1should work![]()
Function findPC(mycell As Range) Dim pCent As String pCent = mycell.NumberFormat If (Right(pCent, 1) = "%") Then findPC = 100 * mycell.Value Else findPC = mycell.Value End If End Function
---
Last edited by Bryan Hessey; 10-23-2006 at 10:38 PM.
Si fractum non sit, noli id reficere.
Thanks, works well![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks