Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
insert a row above the first one
I have a macro with an if/then that puts header rows before all the sorted
departments except it doesn't do the last row. After the if/then block I want to put in a header row on the first row with the department name in cell block (1,17) I have this but the insert doesn't work exactly right. I don't want it to wipe out row one just put a gray header row above it. I almost got it. Thanks, ..Rows(1).Insert.before ..Cells(1, 4).Value = .cells(1,17) ..Cells(1, 4).Font.Bold = True ..Cells(1, 4).Font.Size = 14 ..Cells(1, 4).RowHeight = 18 ..cells(1,4).Font.color = vbWhite |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
insert a row above the first one
..Rows(1).Insert
with.Cells(1, 4) ..Value = .cells(1,17) ..Font.Bold = True ..Font.Size = 14 ..RowHeight = 18 ..Font.color = vbWhite end with -- Don Guillett SalesAid Software "Janis" wrote in message ... I have a macro with an if/then that puts header rows before all the sorted departments except it doesn't do the last row. After the if/then block I want to put in a header row on the first row with the department name in cell block (1,17) I have this but the insert doesn't work exactly right. I don't want it to wipe out row one just put a gray header row above it. I almost got it. Thanks, .Rows(1).Insert.before .Cells(1, 4).Value = .cells(1,17) .Cells(1, 4).Font.Bold = True .Cells(1, 4).Font.Size = 14 .Cells(1, 4).RowHeight = 18 .cells(1,4).Font.color = vbWhite |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
insert a row above the first one
thanks very much,
"Don Guillett" wrote: ..Rows(1).Insert with.Cells(1, 4) ..Value = .cells(1,17) ..Font.Bold = True ..Font.Size = 14 ..RowHeight = 18 ..Font.color = vbWhite end with -- Don Guillett SalesAid Software "Janis" wrote in message ... I have a macro with an if/then that puts header rows before all the sorted departments except it doesn't do the last row. After the if/then block I want to put in a header row on the first row with the department name in cell block (1,17) I have this but the insert doesn't work exactly right. I don't want it to wipe out row one just put a gray header row above it. I almost got it. Thanks, .Rows(1).Insert.before .Cells(1, 4).Value = .cells(1,17) .Cells(1, 4).Font.Bold = True .Cells(1, 4).Font.Size = 14 .Cells(1, 4).RowHeight = 18 .cells(1,4).Font.color = vbWhite |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot insert worksheet in exel - not available in insert menu | Excel Worksheet Functions | |||
insert row / insert column command buttons | Excel Worksheet Functions | |||
Macro to insert copy and insert formulas only to next blank row | Excel Programming | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Insert cell/format/text/fontsize and auto insert into header? | Excel Programming |