I
Isis
I am producing CSV files (in a seprerate app) and importing these into
Excel then saving them out as xls files - that all works well.
I have a need to format the data to make it look better and I would like to
auttomate this using VBA.
I will want to set column widths for my columns (mostly less than 10) and
apply formatting to the columns containing numbers.
I also need to center and bold various header rows that occur throughout
and bold some individual columns.
There are not usually more that 100 rows so speed concerns probably do not
apply here.
Although there are a number of different formats of sheets (requiring
different groups of the formatting mentioned above) - I will be able
identify what these sheets are based on the identification of a single cell
in the topr right (or somewhere).
I have done a fair amount of messing with actual data values ion cells
using VBA code like this;
'For Each lCell In Cells.SpecialCells(xlTextValues)
For Each lCell In Range("A2:N100").SpecialCells(xlTextValues)
lCell.Formula = StrConv(lCell.Formula, vbProperCase)
Next
Next lws
but I have not done any formatting of attributes like bold and number
formatting etc.
I am not sure how to bold and center a whole row in code and how that would
fit with other code that I am using too format numeric formats etc.
I am NOT in any way asking someone to do all this for me, I am happy to put
the work in if anyone can give me a few pointers and start me on the way -
I can always come back if I get stuck !
Any help appreciated.
Thanks
Excel then saving them out as xls files - that all works well.
I have a need to format the data to make it look better and I would like to
auttomate this using VBA.
I will want to set column widths for my columns (mostly less than 10) and
apply formatting to the columns containing numbers.
I also need to center and bold various header rows that occur throughout
and bold some individual columns.
There are not usually more that 100 rows so speed concerns probably do not
apply here.
Although there are a number of different formats of sheets (requiring
different groups of the formatting mentioned above) - I will be able
identify what these sheets are based on the identification of a single cell
in the topr right (or somewhere).
I have done a fair amount of messing with actual data values ion cells
using VBA code like this;
'For Each lCell In Cells.SpecialCells(xlTextValues)
For Each lCell In Range("A2:N100").SpecialCells(xlTextValues)
lCell.Formula = StrConv(lCell.Formula, vbProperCase)
Next
Next lws
but I have not done any formatting of attributes like bold and number
formatting etc.
I am not sure how to bold and center a whole row in code and how that would
fit with other code that I am using too format numeric formats etc.
I am NOT in any way asking someone to do all this for me, I am happy to put
the work in if anyone can give me a few pointers and start me on the way -
I can always come back if I get stuck !
Any help appreciated.
Thanks