format

  • Thread starter sania via OfficeKB.com
  • Start date
S

sania via OfficeKB.com

Hello friends
Accept 2 values in two variables eg. Dt1 and dt2 and print this in the same
cell, eg in 5th row 7th column one below the other “dt1 . The variable
will be replaced by value
To
Dt2â€
CAN WE FORMAT THE DATA IN AN EXCEL SHEET/CELL LIKE FONT SIZE FONT TYPE COL.
WIDTH ROWHEIGHT, ETC.

SUPPOSE I WANT TO FORMAT FOR COLUMN A FROM ROW 10 TO LAST
Couldwe format the data in an excel shet/cell like font size, font type,
col/row width/ht etc in a macro
thankyou
 
F

fisch4bill

You can specify the font size, font type, font name and row height of the
cells from A10 to the bottom of the column, but you have to resize the entire
column the same (A1 to the bottom of the column). Use code something like
this:

With Range("A10:A" & Cells(Rows.Count).Row)
..Font.Size = 11 'use whatever number you need
..Font.Bold = True
..Font.Name = "Arial"
..RowHeight = 20
..EntireColumn.ColumnWidth = 20
End With

This will set the format of all cells in column A from row 10 to the bottom
of the sheet to Bold Arial, size 11 point, in a row height of 20 and it will
make the entire column "A" (including A1:A9) 20 wide.

If you need something different, post more specifics; I think this is what
you were asking for. If this is helpful, please click on the "Yes" below
HTH
 

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