VB Cell Formatting
I am looking to setup borders within the range of active cells, meaning
if there is data in the furthest right column and data in the furthest down row, then to fill all cells encompassed in that intersection with a certain border scheme. The range will change per each report, so I need a dynamic range figured. I am also looking for code where the row will fill with background color, not the entire row only the cells that have data in them. And again, the ranges will fluctate so a simple macro with the range selected will not be beneficial. Thanks for your help, let me know if questions. ~schaapiee |
VB Cell Formatting
Try using conditional formatting
See http://www.contextures.com/xlCondFormat01.html -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "schaapiee" wrote in message oups.com... I am looking to setup borders within the range of active cells, meaning if there is data in the furthest right column and data in the furthest down row, then to fill all cells encompassed in that intersection with a certain border scheme. The range will change per each report, so I need a dynamic range figured. I am also looking for code where the row will fill with background color, not the entire row only the cells that have data in them. And again, the ranges will fluctate so a simple macro with the range selected will not be beneficial. Thanks for your help, let me know if questions. ~schaapiee |
VB Cell Formatting
Let me rephrase my dilemna:
I am trying to get consistent formatting across all sheets (6); I have already done this for the PrintSettings/PageSetup. And have been able to accomplish some formatting such as row 1 being all bold with row height 26, and text wrapped, as these cells are going to consistenly be the same for each sheet. What I need is script which will allow me to perhaps setup a case structure where if it equals "sub-total" or "total" it will do entirerow.bold, rightalign, and entirerow such and such fill pattern. Or case if cell contains like "region" will make italic for those cells, and so forth. Conditional formatting only works on those cells, not the entire rows, as far as I could see..And the placement of the cases will not fall in the same cells throughout the sheets so I need something dynamic.. Additionally, I am looking to customize cell borders. Say I have data through column "x", and row "#"..I only want those cells filled in thin top/bottom/r/l/vert/horz..not the entire sheet, and then if the cell value is "total" to fill in the row with thick border until end column "x", not entire sheet. I currently am working with two subs, one using a "For each ws in Worksheets" with/endwith next ws setup for my page/printer options, AND an array of "worksheets(array(ne,co,ia)).select" followed by select statements. So which ever is easier to accomplish what I want, or a completely different sub using perhaps a case structure...dunno. Thanks for any help. |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com