Formatting to 2 decimal places, placing a page break and autofitting a collumn/row height

S

Sean Farrow

Hi:
I need to do the following:
1. Format to a specific number of decimal places, where is this in the
active cell/selection?
2. Create a page break after the current cell/row.
3. Autofit a collumn/row to the data contained within.
Any help appreciated.
Sean.



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4035 (20090425) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
M

Mike H

Hi,

I think you mean that if there is a (say) 3 in the activecell you want that
cell formatted to 3 decimal places, is that correct? If so try this

With ActiveCell
.NumberFormat = "0." & WorksheetFunction.Rept("0", ActiveCell.Value)
.EntireColumn.AutoFit
End With
ActiveWindow.SelectedSheets.HPageBreaks.Add before:=ActiveCell.Offset(1)

Mike
 
S

Sean Farrow

Hi:
regarding the decimal places, I just want to format to 2 decimals, not the
number in the cell.
Any help appreciated.
Sean.
Mike H said:
Hi,

I think you mean that if there is a (say) 3 in the activecell you want
that
cell formatted to 3 decimal places, is that correct? If so try this

With ActiveCell
.NumberFormat = "0." & WorksheetFunction.Rept("0", ActiveCell.Value)
.EntireColumn.AutoFit
End With
ActiveWindow.SelectedSheets.HPageBreaks.Add before:=ActiveCell.Offset(1)

Mike



__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4035 (20090425) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4042 (20090429) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

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