Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Insert Blank Row with data match change

I'm trying to figure out a way to evenly space data. Where I don't have a
repeat value in the row directly below the current one I want to insert a
blank row. Some of my data series looks like this.

Column A Column B

Part Number Description
(Cell A2): AC011000 (Cell B2) FUEL TANK, CARTRIDGE ADAPTOR
(Cell A3: AC011000 (Cell B3) FUEL TANK, CARTRIDGE ADAPTOR
BLANK ROW
(Cell A5) AC011001 (Cell B5) XX55 Assy, Li-80 Adaptor
BLANK ROW
AC051000 KIT, XX25 MANUALS
AC051000 KIT, XX25 MANUALS
BLANK ROW

I want a blank row to be inserted below Row 5 because the part number is not
repeated.
Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Insert Blank Row with data match change

Not quite sure of your layout but try this

Sub insertrowifnondup()
Dim mc As Long
Dim i As Long
mc = 1 'col a
For i = Cells(Rows.Count, mc) _
.End(xlUp).Row To 2 Step -1
If Len(Application.Trim(Cells(i, mc))) 0 And _
Application.CountIf(Columns(mc), _
Cells(i, mc)) < 2 Then Rows(i + 1).Insert
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mitche" wrote in message
...
I'm trying to figure out a way to evenly space data. Where I don't have a
repeat value in the row directly below the current one I want to insert a
blank row. Some of my data series looks like this.

Column A Column B

Part Number Description
(Cell A2): AC011000 (Cell B2) FUEL TANK, CARTRIDGE ADAPTOR
(Cell A3: AC011000 (Cell B3) FUEL TANK, CARTRIDGE ADAPTOR
BLANK ROW
(Cell A5) AC011001 (Cell B5) XX55 Assy, Li-80 Adaptor
BLANK ROW
AC051000 KIT, XX25 MANUALS
AC051000 KIT, XX25 MANUALS
BLANK ROW

I want a blank row to be inserted below Row 5 because the part number is
not
repeated.
Can anyone help?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match,Update & insert new data - Please HELP! TK Excel Worksheet Functions 4 September 25th 09 11:35 PM
Insert a blank row after change in data Genghis2k3 Excel Worksheet Functions 3 January 11th 09 07:31 PM
Insert a blank row after change in data Genghis2k3 Excel Worksheet Functions 1 March 28th 07 01:09 AM
How can I insert a blank row after every row with data with Excel margaret1115 Excel Discussion (Misc queries) 2 May 9th 06 11:02 PM
insert a blank row after data changes in a column cyndi Excel Discussion (Misc queries) 2 October 24th 05 02:46 PM


All times are GMT +1. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"