ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   INSERT LINE after Vendor name change (https://www.excelbanter.com/excel-worksheet-functions/23825-insert-line-after-vendor-name-change.html)

Rashid

INSERT LINE after Vendor name change
 
Hi All,

I have a big Excel report that I run on a daily basis. My boss wants
me to insert 2 blank rows after every name change in vendors_name
coloumn. The idea is to seperate vendors so it is easy for him to
review the report.

How can this be done?

Please help, it is very important.

Thanks,

Rashid

Ron Coderre

If all your boss needs is a more viewable report, can't you just expand the
row height and set all info cells to align to the top? That will space the
data and enhance readability without cluttering up the space with extra rows.

Can that work in your situation?

Ron


Ron Coderre

Second thought, would automatic subtotals at each change in the Vendor name
work? You'd get the row separators with practically no effort.
--
Regards,
Ron


Gord Dibben

Rashid

Can you live with a macro?

Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) < Cells(i, 1) Then _
Cells(i, 1).Resize(2, 1).EntireRow.Insert
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub

Assumes vendors names are in column A.


Gord Dibben Excel MVP

On 27 Apr 2005 07:16:54 -0700, (Rashid) wrote:

Hi All,

I have a big Excel report that I run on a daily basis. My boss wants
me to insert 2 blank rows after every name change in vendors_name
coloumn. The idea is to seperate vendors so it is easy for him to
review the report.

How can this be done?

Please help, it is very important.

Thanks,

Rashid




All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com