Results 1 to 8 of 8

VBA - how to get row number?

Threaded View

  1. #1
    Registered User
    Join Date
    02-18-2007
    Location
    Manila / Philippines
    Posts
    42

    VBA - how to get row number?

    Hi,

    I'm an absolute beginner in VBA and I'm trying the learning by doing method.

    Can somehow help me pleae with this simple problem:

    After having imported a text file into excel I have something like that:

    Row Content
    1 HOUSE
    2 MOUSE
    3 XXX
    4 SB73
    5 KLM
    6 ICON
    7 SHOE88
    8 XXX
    9 78
    10 25 MILES
    11 FLOOD
    12 XXX
    13 AIR86PLANE
    ETC
    ETC

    Now I want to export (copy and paste) the arrays which are in between "xxx" to a new sheet. First array should be placed at A1, second at E1 third at A1+20 fourth et E1+20, fifth at A1+40, sixth at E1+40 etc.

    How would I do that?

    My Idea is to find out the row number of the "xxx" and then copy and paste the rows in between. For example the second "xxx" is at row number 8 and the first xxx is at row number three. Therefore I know that I have to copy and paste 4 cells (8-3+1) starting from row number 4 (3+1). How to find out at which rom number the xxx's are located

    Thanks for your help.

    Cheers,
    hegisin
    Last edited by hegisin; 02-21-2007 at 01:27 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