View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Sean Farrow Sean Farrow is offline
external usenet poster
 
Posts: 34
Default Formatting to 2 decimal places, placing a page break and autofitti

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" wrote in message
...
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 befo=ActiveCell.Offset(1)

Mike

"Sean Farrow" wrote:

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






__________ 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