Formatting help.

Ross_curtis

New member
Local time
Today, 15:34
Joined
May 29, 2009
Messages
5
Hi,

Firstly I know very little about VBA so please bear with me and excuse my ignorance. hopefully what I need to do is fairly simple.

I have a macro with various drop downs, from these drop downs I select a column heading IE J. I do this for various items in an Excel sheet. Once all the columns/data has been selected I click OK and the macro formats the data and places it in the correct column for our use.
I have managed to change the VBA code to place the data in to different columns. It all seems to be working correctly except for one column. This column in excel will have data like 5.80% (which is a Contribution rate) when it comes out of the macro it appears as 000006, I need to have 000580. The formatting within the code reads:

ActiveCell.NumberFormat = "General"
ActiveCell.Offset(0, 27).NumberFormat = "000000"

I would assume this requires changing but I have no idea as to what.

I'd be grateful for any suggestions.

Thanks
Ross
 
Would this work?
Code:
ActiveCell.NumberFormat = "General"
ActiveCell = ActiveCell * 1000
ActiveCell.Offset(0, 27).NumberFormat = "000000"
 

Users who are viewing this thread

Back
Top Bottom