Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
blank rows macro question
I get this spreadsheet every week that I have to format and all, so recorded a macro. Something I have to do manually is go through al the part numbers in columb B and find similar ones. I sort them b column B, then I insert a blank row to seperate groups of part numbers Is there anyway to throw this in my macro? Have it sort by column then put a space after every seperate set of part numbers -- DK ----------------------------------------------------------------------- DKY's Profile: http://www.excelforum.com/member.php...fo&userid=1451 View this thread: http://www.excelforum.com/showthread.php?threadid=26250 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
blank rows macro question
DKY
one way: Sub test() Dim LastRow As Long Dim i As Long LastRow = Range("B65536").End(xlUp).Row Application.ScreenUpdating = False For i = LastRow To 2 Step -1 If Range("B" & i).Value < _ Range("B" & i - 1).Value Then Range("B" & i).EntireRow.Insert End If Next 'i Application.ScreenUpdating = True End Sub Regards Trevor "DKY" wrote in message ... I get this spreadsheet every week that I have to format and all, so I recorded a macro. Something I have to do manually is go through all the part numbers in columb B and find similar ones. I sort them by column B, then I insert a blank row to seperate groups of part numbers. Is there anyway to throw this in my macro? Have it sort by column b then put a space after every seperate set of part numbers? -- DKY ------------------------------------------------------------------------ DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=262505 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
blank rows macro question
hi,
it might be possible. IF you can find a way to distinguish between the numbers. post and example of the numbers. please keep your reply posts to the orginal post. -----Original Message----- I get this spreadsheet every week that I have to format and all, so I recorded a macro. Something I have to do manually is go through all the part numbers in columb B and find similar ones. I sort them by column B, then I insert a blank row to seperate groups of part numbers. Is there anyway to throw this in my macro? Have it sort by column b then put a space after every seperate set of part numbers? -- DKY ---------------------------------------------------------- -------------- DKY's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=262505 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to HIDE blank rows | Excel Worksheet Functions | |||
Macro Help- Inserting Blank Rows | Excel Discussion (Misc queries) | |||
Delete blank rows Macro | Excel Discussion (Misc queries) | |||
Inserting Blank Rows Macro? | Excel Worksheet Functions | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming |