Eric has attended:
Excel Intermediate course
Excel
Hi
I have a bunch of numbers which I need to convert from pence to pound. e.g 1000 convert to 10.00. I am aware i can divide each number by 100. Thereafter cut and paste. I still find it quite laborish task.
What is most efficient way of effected this task as I have a lot of numbers to convert.
Thanks and Regards
Eric
RE: Excel
Hi Eric,
Thank you for the forum question.
I know what I would do but this involve VBA programming in Excel.
Unfortunately there is no tools in Excel which can do it. You will need to do the calculation and copy and paste.
If you know about VBA I have created two solutions.
If you add the following code into a module in the Visual Basic Editor in the workbook and run it all numbers in the worksheet will be divided by 100.
Sub ConvertToPoundAllNumbers() 'Code start
For Each cell In Cells.SpecialCells(xlCellTypeConstants, xlNumbers)
cell.Value = cell / 100
Next cell
End Sub 'code end
If you don't want all numbers divided with 100 you can select the numbers and use the code below and all numbers in the selection will be divided by 100.
Sub ConvertToPoundSelection() 'code start
For Each cell In Selection
cell.Value = cell / 100
Next cell
end sub 'code end
VBA in Excel is very powerful and can save us a lot of time.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector