+ Reply to Thread
Results 1 to 3 of 3

Finding values

  1. #1
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500

    Finding values

    Hi

    I got a worksheet which has 5 columns I want to do a search in column a. Column A has 5 digit numbers. these numbers run in nummeric order.

    this is information taken from an old system. Data used to be entered in and the record number ended in 0. Of course this coursed a problem as it used up the numbers quiet quickly and on our old database we could only have 5 digit number. so to rectify the problem we started including 1-9 so now in excel I got a list (see example.xls) where by it runs nummeric order from 80000-80023 and then 80030,80040,80050 how do i run a find that picks up if it exists if it does then tell the user and leave a row and insert next number.

    It is really hard to explain so please refer to example.xls
    Attached Files Attached Files

  2. #2
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    anybody?

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can do it with a macro:
    Sub InsertRows
    rowNumber = Cells(20000, 1).End(xlUp).Row
    i = 3
    Do While i <= rowNumber
    If Cells(i, 1) <> Cells(i - 1, 1) + 1 Then
    Rows(i).Insert
    Cells(i, 1) = Cells(i - 1, 1) + 1
    rowNumber = rowNumber + 1
    End If
    i = i + 1
    Loop
    end sub

+ 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