Code:
Sub changetoacertainpercentage()
Application.Run ("SelectBold")
Dim cell As Range, askedchange As Double, answer As String, answer1 As String
If ActiveCell.NumberFormat <> "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)" And ActiveCell.NumberFormat <> "$#,##0.00" And ActiveCell.NumberFormat <> "$#,##0.00_);[Red]($#,##0.00)" Then Exit Sub
answer = InputBox("What percentage you want to increase?")
answer1 = InputBox("What Penny Amount Do You Want It Rounded? ")
askedchange = 0.01 * Val(answer)
For Each cell In Selection
If answer1 <> "" And cell.Value <> "" And IsNumeric(cell.Value) Then cell.Value = Application.MRound(cell.Value * (1 + askedchange), answer1)
If answer1 = "" And cell.Value <> "" And IsNumeric(cell.Value) Then cell.Value = cell.Value * (1 + askedchange)
Next cell
End Sub
Hi
i need help with modifying this vba code
I have in a cell that is formatted as currency a value, with text inside.
How can i have this code find only the numbers in that particular cell and change them accordingly for ex. in one cell i could have
$17.75 BX
$106.50 CS
(merge and center & wrap text)