Results 1 to 5 of 5

Insert row

Threaded View

Cstolworthy Insert row 10-20-2010, 01:02 PM
Leith Ross Re: New to VBA - Need help... 10-20-2010, 01:21 PM
MarvinP Re: New to VBA - Need help... 10-20-2010, 01:24 PM
Cstolworthy Re: Insert row 10-20-2010, 03:23 PM
MarvinP Re: Insert row 10-20-2010, 06:36 PM
  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    American Fork, Utah
    MS-Off Ver
    Excel 2003
    Posts
    2

    Insert row

    I am new to VBA, but I am experienced in C#. So I am sure i am just having a disconnect somewhere with how to actually do this. I am working in Excel.

    I have an array with some specific values in it. The array is declared as follows:

    Dim CodesToSplit(2)
    CodesToSplit(0) = 80000060
    CodesToSplit(1) = 80000094
    I need to go through all the rows and if the cell contents in Column G match any of the values in my array I need to do the following:
    Insert a new row (above or below, it doesn't matter)
    Copy the contents of the row to the new row
    Take the value in column H and in one of the rows it should be 1, the other will be the original value of cell H - 1

    So if the row is setup like this:
                             Cell G                        Cell H
    Row 1               80000060                       4
    After it should look like this:
                             Cell G                         Cell H
    Row 1               80000060                       1
    Row 2               80000060                       3
    Any help would be greatly appreciated
    Attached Files Attached Files
    Last edited by Cstolworthy; 10-20-2010 at 03:21 PM.

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