+ Reply to Thread
Results 1 to 2 of 2

macro with counter ?

  1. #1
    Registered User
    Join Date
    09-30-2009
    Location
    Wageningen Holland
    MS-Off Ver
    Excel 2003
    Posts
    1

    Lightbulb macro with counter ?

    as a new member and not so experienced Excell user, I have the following problem.

    I want to split up a very large table. Depending on what is in a record(line) I decide to make a split by inserting 2 lines.

    On the first line of the table I insert 1 (one) line and in the first cell of that (new) line the value 1 (one) is entered.

    With the cursor I move down several lines, there insert 2 lines. In the first cell of the first new line the text END is typed and in the 1st cell of the second new line the value 2.

    With the cursor I move down several (number not important!) lines, there insert 2 lines. In the first cell of the first new line the text END is typed and in the 1st cell of the second new line the value 3.

    And so on. and the value of the 1st cell in the 2nd new line increases 1.

    I am able to create a macro to insert at the position I want, two (2) lines with in the 1th cell of the 1st line the text END. But how to put an increasing value in the 1th cell of the 2nd line, that is the problem!

    Who understands my problem and is able to solve it?

    Thanks anyway for reading !

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: macro with counter ?

    Hi, Right Click Sheet Tab, Select "View Code", VB Window appears.
    Paste Entire Code in VB Window.
    To use the code Right Click any cell within you range of Data (Column selected within range does not matter).
    Code will insert Two rows. In first Row column "A" the word "End" will appear.
    In the Second Row the index number, of the number of Double rows inserted will appear.

    Please Login or Register  to view this content.
    Regards Mick

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1