Add row after column of duplicate info

I want to know if there is a way to have Excel 
automatically insert a blank row after a column if the 
number in the column changes.

Example:
Column B
110011
110011
110011
110345
110347
110347

Would like for it to automatically insert as below:

110011
110011
110011
Insert blank row here
110345
Insert blank row here
110347
110347
Insert blank row here

Can anyone help with this?  It would be greatly 
appreciated :)

Debe
0
anonymous (74719)
4/30/2004 3:21:26 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
385 Views

Similar Articles

[PageSpeed] 41

Data|subtotals can add a line with subtotals between cells with common values.

You can use the outline symbols to show just the subtotal line, 
select those visible rows
hit F5 (edit|goto, ctrl-g)
click special
hit the delete key to clear the subtotals
tools|options|view|uncheck outline symbols.

But I don't like putting blank rows into my data.  But adjusting the rowheight
to be double gives that same effect and makes other stuff easier
(sorts/pivottables/charts).

But here's macro that will insert that blank row.

Option Explicit
Sub testme()

    Dim FirstRow As Long
    Dim LastRow As Long
    Dim iRow As Long
    
    With ActiveSheet
        FirstRow = 1
        LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
        
        For iRow = LastRow To FirstRow + 1 Step -1
            If .Cells(iRow - 1, "B").Value = .Cells(iRow, "B").Value Then
                'do nothing
            Else
                .Rows(iRow).Insert
                'With .Rows(iRow)
                '    .RowHeight = .RowHeight * 2
                'End With
            End If
        Next iRow
    End With
End Sub

You can comment (.rows(irow).insert) and uncomment the with/end with block to
make it double the rowheight.


Debe wrote:
> 
> I want to know if there is a way to have Excel
> automatically insert a blank row after a column if the
> number in the column changes.
> 
> Example:
> Column B
> 110011
> 110011
> 110011
> 110345
> 110347
> 110347
> 
> Would like for it to automatically insert as below:
> 
> 110011
> 110011
> 110011
> Insert blank row here
> 110345
> Insert blank row here
> 110347
> 110347
> Insert blank row here
> 
> Can anyone help with this?  It would be greatly
> appreciated :)
> 
> Debe

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
5/1/2004 1:30:57 AM
Reply:

Similar Artilces:

Add Lookup Fields to Entity
I need to add 4 "technical contact" fields (which would lookup the Contact entity) to the CONTRACT form. Is this possible? I've found it difficult to figure out what to do first. Thanks in advance, Brandon Not possible. You cant have multiple lookups for the same entity. You also cannot create new relationships between two system entitites. This will work in 4.0 Not possible, Pezman. N:M relationships are not possible in 3.0 yet. There is a alternative solution: a new entity to act as an N:M relationship. In your case, Contract/Contact. This entity has two 1:N relations...

Hide certain columns in range
Hi All........ I have a Range named "Months" which is B25:AW25. Each cell in that range contains a number of 1-12 standing for a month. I would like to be able to hide all columns except the Month number I choose, and the one on each side of it. For example, if I choose the month 7, then I want to hide all columns except those with a 6,7, or 8 in my range. And of course if I choose month 1, I want all except 12, 1, and 2 to be hidden, etc. TIA for any ideas Vaya con Dios, Chuck, CABGx3 Are your month numbers in consecutive order through the range B25:AW25 li...

Excel Add Ins
What is the name of the template wizard with Data Tracking (Excel. I can not locate the add in template wizard with Data Tracking in Office 2003 Hi Richard You are not the only one<g> The Add-in is working in 2003 only the install file is not working. Copy the xla file from a PC with 2002 to the PC with 2003 and it will work(use Tools>add-ins to browse to the file in Excel) -- Regards Ron de Bruin http://www.rondebruin.nl "Richard" <Richard@discussions.microsoft.com> wrote in message news:193C5DFD-578D-48F7-B9D6-9FEF5BDCEB64@microsoft.com... > What is t...

Add on
Hello, Here is a scenerio. A client is buying 1lb of ham. It is put on a waxed paper then wrapped into a white paper and then put into a shopping bag. The usage of shopping bag is 100% cases the usage of paper is only with certin categories of sales. Same with the waxed paper. Question: Is there a way of associating wax paper, white paper and shopping bags in a way so with every sale a piece of paper gets deducted from inventory and one bag is deducted from inventory? I would like to run a report every so often and see if I need to purchase any supplies. Kits and assembly do not work...

add a row or column to a single cell in exel
I am trying to split a single cell into 2 rows can you help If I understood correctly you want to enter an entry in two lines in a cell at appropirate place hit lt+enter and again hit enter for e.g venkat (alt+enter) raman(enter) "trev" <trev@discussions.microsoft.com> wrote in message news:89B2C15C-057F-43B9-8282-37923D5EA397@microsoft.com... > I am trying to split a single cell into 2 rows can you help ...

way to delete add. fr. auto. email add. function?
Is there a way to delete old or no longer used email addresses that appear in the drop down box when I am addressing a new email? Shebubba wrote: > Is there a way to delete old or no longer used email addresses that appear in > the drop down box when I am addressing a new email? That is the nickname cache. Search and delete the .nk2 file. That's the cache for nicknames (i.e., your manually entered e-mail addresses). If you only want to delete some of them, highlight an entry and hit the delete key. If that doesn't work, use Nirsoft's NK2 Viewer utility (it e...

POS 2009 Add-In: Populating a Task Pad
I would like to create a custom application that has the ability to maintain the items that are on certain Task Pads within POS 2009. These items would all be regular menu items (ex: hamburger, hot dog, french fries, etc) and not functions. For example, if a task pad was supposed to allow the cashier quick access to daily specials, then this custom application would need to be able to clear the task pad each day and add the items for that day. Is this going to be possible? Please provide some guidance. Thank you, Sean This is a multi-part message in MIME format. ------=_NextPart_00...

Add-in cannot be loaded OL07
Every time I open Outlook 2007 I get an error message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). It says the add-in cannot be loaded and has been disabled by Outlook. I've been getting this message ever since I uninstalled Winfax. How do I make this error stop appearing? Thanks. -- kapibarra Remove the addin from OL by using Trust Center, Addins. http://office.microsoft.com/en-us/outlook/HA100341271033.aspx#14 "kapibarra" wrote: > Every time I open Outlook 2007 I get an error > message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). ...

Format text to add character
I have two fields that should match, but one includes special characters while the other does not. Example: Field1 00ABCD123456123 Filed2 00/ABCD/123456/123/SBZ I need to find records where these two fields don't match, either by changing the display of one of them, or a query to compare Field1 character 7-15 with Field2 characters 9-14, 16-18. Hope this makes sense. Can anyone help? Thanks! Take a look at the following from the Access Help file it might be what you're looking for... Extract a part of a text value The following table lists examples of expressions that ...

Rank a Column + 1 cell from 2nd Col
I have 6 columns: A B C D E F 274 1 269 ? 279 ? 275 2 270 ? 280 ? 276 3 271 ? 281 ? 288 4 283 ? 293 ? Column B represents a simple 'Rank' of Column A In the first row of column 'D' I want the rank of the 269 in relatio to the figures in column 'A' which equals 1. I also want the rank o 270, 271 & 272 in relation to their position on Column 'A' - whic would equal 1, 1, 4 In Column 'F' I want the rank of those figures in 'E' relation to th values of column 'A'. Which would equal 4, 4, 4, 5 Any help would ...

Add File menu to custom toolbar
Hi All, I am trying to add the 'File" menu and "Window" menu of the Standard Toolbar to a custom toolbar but failing miserably! I think it should look something like: Sub AddMenuTitles() Application.CommandBars("MyCustomMenu").Controls.Add("File) Application.CommandBars("MyCustomMenu").Controls.Add("Window") End Sub Can anybody help please Regards Michael Sub test() AddMenuTitles True ' or false to delete End Sub Sub AddMenuTitles(bAdd As Boolean) Dim cbr As CommandBar Dim cbP As CommandBarPopup ...

How to find the value of a Duplicate (Name) entry?
Unlike most people with Duplicate entry problems I do NOT want to delet it! What I have is a report that is sent to us every day as a text file. have it converted automatically to an excel worksheet so excel can pul the numbers out that we need for reports. The problem is this: Jason Longhaul LA...................822 Jason Longhaul LA...................73 The number of rows between Jason Longhaul LA and the duplicate can an does vary, otherwise I could find the first one and count down x numbe of rows to get the value of the second one. What I need to do is run my formula to get the va...

add a DC in a LegSite
Hi, In the disaster recovery plan we want to create a leg site and put a DC in it. Here are some questions on how to achieve this smoothly. 1. Should I create the new site/subnet first and then promote a server in that subnet/site to DC, or should I promote a server in existing site/subnet and then move this DC to the new site/subnet? 2. When promoting a server to DC, should the server be a member server (already joined the domain) or just a workgroup member (no domain membership)? 3. The DC will be an AD-integrated DNS server. Should I install the DNS component (but not confi...

How can I add the customer's PO# to the drop-ship Purchase Order?
Our purchasing agent would like to be able to have the customers PO# from the Sales Transaction Entry screen show up on the PO's. Is this doable in Report Writer or can it not be done? We are using GP v9.0. As I still consider myself a newbie with RW, I would appreciate detailed instructions if possible. Thank you in advance for all responses. It is not possible thru traditional table relationships in Report Writer. Let me explain: you can certainly link the Purchase Order Work table to the SOP_POLink table and the SOP_POLink table to the SOP Transactions Work table, but will...

excel add-ons
Awhile back, there was an add-on for excel that had a lot more tools. It showed on the toolbar. Somehow I lost it and I would like to get it back. It had a lot of tools like for changing case and fill ins. Any help wouyld be great. Maybe ASAP Utilities. Try a 'net search for this add-in. Gord Dibben MS Excel MVP On Sun, 22 Mar 2009 20:22:43 -0400, "kmkx70a" <kmkx70a@prodigy.net> wrote: >Awhile back, there was an add-on for excel that had a lot more tools. It >showed on the toolbar. Somehow I lost it and I would like to get it back. It >had a lot of t...

Having OL automatically add a bcc: address
My boss wants to add me as a bcc: to every email she sends. Is there a way to set this up to happen automatically? Please reply to matt@lkigroup.com Thanks much. Matt ...

copy row to different tab
Creating a SS with 6 tabs(master,A,B,C,D,E) each having 5 columns(doc#,category,date,box,folder). "Category" can have 5 different values, A,B,C,D,E According to which value in 'category' is entered in master I want to copy the row and move it to corresponding tab. Can an IF statement do this? thanks, L. Worksheet functions cannot 'physically' copy rows or columns, nor can they format, hide, display, delete or add rows/columns. Your question included "copy and move", so that definitely rules out worksheet functions. To me, the &q...

X axis labels won't line up under corresponding column data
Only way I can get dates (year 1998, 1999 and on etc) to fall under annual income columns is to horse around with spacing, adding and subtracting spaces in the category axis drop-down box in Chart Options. Seems you can't even use the same number of spaces between each because if you add between two of them, adding the same number of spaces doesn'tnecessarily work between the next two. I have about 8 charts to mess with and can't find an easy way to do this. did you try this righclcik x axis, clcik <format axis> choose <scale> UNCHECK <value(y) axis crosed be...

Map Add-On?
I am looking for an Excel Chart add on so that I can take numerical data and display it on a geographic map of states or zip codes for example. Even better I could color or shade a state based on the values in my spreadsheet. Any suggestions would be appreciated. Mark ...

Consolidating and totaling rows into single row
I have an Excel 2003 spreadsheet with Position Title, Location, Pay Plan, Position Series, Position Grade, and FTEs. I want to organize this data by Position Title, then Location, then Grade, and finally FTEs. For example, I have multiple rows of Human Resources Specialist in different locations, in different grades each with a FTE of 1. I'd like to consolidate each row of Human Resources Specialist in the same location in the same grade and have the row display the total number of FTEs for that title in that grade at that location. Thanks in advance for your help! A p...

How to add a VScroll to a CStatic Object
I create a CStatic object and write some text to the object but the text is too long to display in the work area but I don't konw how to add a vscroll to a CStatic object who can help me? I would say instead of a CStatic, use a CEdit control with the ReadOnly flag set. Because static controls by default aren't scrollable, so even if you add a scrollbar to it, you will have to manage the entire thing yourself (drawing, scrolling....), more trouble than it's worth. Ali R. "Smallfrogs" <super_smallfrogs@hotmail.com> wrote in message news:eLAO92y7DHA.2832@tk2msft...

Code to select rows by a null cell in a set column
Excel 2003 I have a 3 worksheet workbook (Instructions, Contacts, Import), On the Contacts worksheet there is 5 columns, Column "A" has a numeric value of "1" in all cells (Approx 300 Rows that contain data) The other columns contain text. This workbook is for a master email list that will allow a user to select the contacts they want to import into Outlook (on the Contacts Sheet) by removing the "1" in Column "A" After the user has removed the "1" from all rows that they do NOT want imported, then I want them to be able to click a button to...

Rows to repeat at top
We know how to repeat rows for printing, but want to be able to view, or keep them stationary, the top 2 rows of the sheet while scrolling or paging down. Can this be done? Thanks for your time and interest. M. Cooper drag the little bars on the scroll bars and then freeze panes on the window menu "Coopfab" <coopfab@email.msn.com> wrote in message news:uanEcdaJFHA.1280@TK2MSFTNGP09.phx.gbl... > We know how to repeat rows for printing, but want to be able to view, or > keep them stationary, the top 2 rows of the sheet while scrolling or paging > down. > > C...

Column spacing problem
Every so often I have a problem with the location of text in adjacent columns. I'm currenly using Pub 2003 but I've had the same issue show up in 2000 (or maybe it was 2002). As the text flows from one column to the next, the text does not start at the top of the column. I've checked the "Format Text Box" dialog box and it's set for Top and the dimensions are the same as the next article and that text is fine. Any suggestions where to start? ----- JoAnn Two things are aesthetically perfect in the world - the clock and the cat. --Emile-August Char...

all email comes in as duplicate! Help!
All of my incoming mail is coming in double. Ugh. I am very, very non technical. I use Outlook 2000, not Outlook Express, and am on Windows XP Professional. ...