Results 1 to 3 of 3

Using Loops

Threaded View

  1. #2
    Registered User
    Join Date
    06-03-2007
    Posts
    11

    Question Using Loops

    I am trying to work out how to convert the following code using Loops so that after cell K2 the code goes down the column until it reaches a Row where no data exists. Anybody help. I have not used Loops before.

    Thanks
    Greg


    Sub TravelTime()
    Range("K2:K2").Select
    If Range("G2").Value = "LA" And Range("J2").Value = "San Francisco" Then
    Range("K2").Value = 1
    ElseIf Range("G2").Value = "LA" And Range("J2").Value = "Palm Springs" Then
    Range("K2").Value = 2
    End If
    End Sub
    Last edited by Greg1234; 06-03-2007 at 07:08 AM.

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