If statement in VBA to change formatting from % to numbers

C

Crauwf

I have column in a s/s where some numbers are currently formatted as a
percentage and others as a number, but i want to change them so that they are
formatted as numbers.

So for example in a column i have:-

A B (What i want it to return)
65% 65
63% 63
62 62
61% 61

I tried writing the below code, but VBA didn't like it....

Sub Macro2()

x = 1

Do Until Cells(x, 8).Value = ""

Cells(x, 8).Select

If Cells(x, 8).Format = "0.00%" Then

Selection.NumberFormat = "0.00"


End If

x = x + 1

Loop

End Sub

I realise that i would have to add a column and * all %'s by a hundred to
get my desired effect.

Could anyone help with my query.

Thanks! Crauwf.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top