Auto Decimal Place Application

  • Thread starter Thread starter Waikato300zxClub
  • Start date Start date
W

Waikato300zxClub

Hi,

I have a spreadsheet that deals with numbers to different decimal
places at different times. Instead of manually going over the other
cells and changing via format number menus to 2dp or 3dp etc is there a
way to have a key single cell that I can set the format in and the rest
of the cells all follow suit?

IE in cell A1, I have the number 20.000, and in A2~A10 I have a range
of other numbers that will automatically adopt the 00.000 dp placement?

Thanks,

Slash.
 
What is wrong with selecting cells A1:A10, then performing the format
operation?
Excel has a formatting toolbar (View/Toolbars/Formatting) that has buttons
 
Caus its not that simple, the cells and rows are all over the place so
selecting them all to do a global dp change is long winded this is why
I was thinking of a key cell that all the others then are going to
follow suit to when I change that one cell.

Possibly a macro function?

Cheers,

Slash.
 
You could try naming the key cell and the target range. Then use a macro
like this and assign it to a button to make the number format the same. I'm
not sure how to make it automatic as I don't know of any events that are
triggered by changing the number format of a cell, otherwise you could use an
event handler.

Sub Test()
Range("TargetRange").NumberFormat = _
Range("KeyCell").NumberFormat
End Sub
 

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

Back
Top