Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-24-2010, 09:30 AM
Kimberly Kimberly is offline How to organize and insert blank cells between a huge number of data? Windows 7 How to organize and insert blank cells between a huge number of data? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Code:
Sub FixList()
 
Range("A1").Select
 
   Do
    If (ActiveCell.Value > ActiveCell.Offset(0, 1)) Then
 
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
 
     Else:  ActiveCell.Offset(1, 0).Range("A1").Select 
 
        End If
 
       Loop Until IsEmpty(ActiveCell.Offset(0, 1))
 
    End Sub
Be sure to do this on a copy of your worksheet, not the original.
The macro will quit when it encounters a row where col B is empty.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bar chart help urgent ????? aligahk06 Excel 1 07-08-2010 12:23 AM
Bar chart help urgent ????? aligahk06 Project 0 07-03-2010 06:58 AM
How to organize and insert blank cells between a huge number of data? Urgent help regarding automation. aligahk06 Excel 1 01-14-2010 01:55 PM
Urgent Help Required id12345 Word 4 12-29-2009 08:22 AM
Urgent help! captainspi Word 2 04-19-2009 11:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft