Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel

ResolvedVersion 2010

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

Thu 12 Nov 2015: Automatically marked as resolved.

Excel tip:

Quick Absolute Cell References

When entering cell references in a formula you probably click the cell, or you may type in the cell reference. If you require any of the 4 variations, press the F4 key now before you press Enter to toggle around the relative and absolute entries ($signs).

Note that the F4 key outside of editing a formula is the Repeat key to repeat a previous action.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.