Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
place a blank row above certain cells
I would like to add a row above certain cells that repeat themself. For
example, Column T list several company names like this. Arby's Arby's Arby's Burger King Burger King Burger King My list is very long and I would like to create a formula that would automatically place a blank row between company names. Any help is greatly appreciated. Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
place a blank row above certain cells
something like sub insertrowsif() mc="a" for i=cells(rows.count,mc).end(xlup).row to 2 step -1 if cells(i-1,mc)<cells(i,mc) then rows(i).insert next i end sub -- Don Guillett Microsoft MVP Excel SalesAid Software "aledger" wrote in message ... I would like to add a row above certain cells that repeat themself. For example, Column T list several company names like this. Arby's Arby's Arby's Burger King Burger King Burger King My list is very long and I would like to create a formula that would automatically place a blank row between company names. Any help is greatly appreciated. Thanks. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
place a blank row above certain cells
Easy to do but will screw up any chance of sorting or filtering you may want to
do with the names. Maybe better would be to make the first instance of each new name double-height? Sub insertrowsif() mc = "a" For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i - 1, mc) < Cells(i, mc) Then With Rows(i) .RowHeight = .RowHeight * 2 End With End If Next i End Sub Gord Dibben MS Excel MVP On Fri, 22 Feb 2008 07:51:02 -0800, aledger wrote: I would like to add a row above certain cells that repeat themself. For example, Column T list several company names like this. Arby's Arby's Arby's Burger King Burger King Burger King My list is very long and I would like to create a formula that would automatically place a blank row between company names. Any help is greatly appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Index/match - make blank cells return a blank value. | Excel Worksheet Functions | |||
Maximum Number of Blank Cells between Non Blank Cells in a Range | Excel Worksheet Functions | |||
How Do I Place a Picture Behind Cells | Excel Discussion (Misc queries) | |||
Keeping cells in place | Excel Worksheet Functions | |||
why can't I place the cursor directly on certain cells? | Excel Discussion (Misc queries) |