View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tb tb is offline
external usenet poster
 
Posts: 12
Default Percentage Increase

On 1/4/2013 8:04 PM, joeu2004 wrote:

None except the VBA solution that someone provided you in the Microsoft
Community forum.

Of course, if you are going to use VBA, you might as well let it do the
percentage increase as well instead of making it a 2-step process, if
your data are constants.

(Sounds like they are.)

Alternatively, you could set up a Worksheet_Change event macro so that
the VBA code would execute automagically when you perform the
paste-special-multiply operation.

I was tempted to suggest that in the MC forum. But I decided it is too
error-prone. Much safer to execute the macro manually when you need it.


The idea of applying a percentage increase and rounding/truncating to
two decimals all in a single step is appealing... Unfortunately I know
zero about VBA macros!

Yes my data is constant. Would you do me a favor and show me how I
should amend the VBA script which was suggested in the Microsoft
Community forum so that it also applies the percentage increase?

Sub RoundSelection()
Dim Cell As Range
For Each Cell In Selection
Cell.Value = WorksheetFunction.Round(Cell.Value, 2)
Next Cell
End Sub


Thanks.
--
tb