Results 1 to 9 of 9

a double loop?

Threaded View

  1. #1
    Registered User
    Join Date
    08-03-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    24

    a double loop?

    Hi,

    I have a sheet and i want a macro to go down column A until it finds a name then go right until it finds the name of the column.

    so on the sheet attached, it would go down a and find Test3 then go along till the column header was example 4 and return the figure 0.7323.

    ive got it going down, and then going across but cant get it stop accordin to the column header:
    Sub test()
    
    Do
    
        If ActiveCell.Value = "test3" Then
    
    Do
            ActiveCell.Offset(0, 1).Select
        
        Loop Until ActiveCell.Value = "example4"
            
        End If
    
        ActiveCell.Offset(1, 0).Select
    
        Loop Until IsEmpty(ActiveCell.Offset(0, 1))
    
    
    
    
    End Sub
    Attached Files Attached Files
    Last edited by royUK; 08-03-2010 at 09:53 AM. Reason: add code tags

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