Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Insert a new row when the criteria is met in the cell above

I have part numbers in a spreadsheet that may appear several times in a
column. I do a sort on these part numbers to get the same part numbers
together. I now need to insert a blank row between the different part
numbers. (As soon as the part numbers changes I need a blank row inserted)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 380
Default Insert a new row when the criteria is met in the cell above


For i = Cells(Rows.Count,"A").End(xlUp).Row To 2 Step -1
If Cells(i,"A").Value < Cells(i-1, "A").Value Then
Rows(i).Insert
End If
Next i

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Firefighter1" wrote in message
...
I have part numbers in a spreadsheet that may appear several times in a
column. I do a sort on these part numbers to get the same part numbers
together. I now need to insert a blank row between the different part
numbers. (As soon as the part numbers changes I need a blank row inserted)



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
Insert text in Cell A1 based on keyword criteria [email protected] Charts and Charting in Excel 1 June 13th 06 04:56 PM
how do I insert the address of a selected cell into a fixed cell cox Excel Discussion (Misc queries) 2 May 27th 06 07:44 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
count cell if value present in every other cell + criteria lrbest4x4xfar Excel Worksheet Functions 2 September 26th 05 01:30 AM
"criteria" in a sumif refering to the value in another cell mark Excel Discussion (Misc queries) 1 January 31st 05 07:39 PM


All times are GMT +1. The time now is 05:01 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"