Results 1 to 5 of 5

For Next Loop not working

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    For Next Loop not working

    Hello all

    I know it has to be something simple, but I just don't see why this little for next loop doesn't work. Can anyone tell me?

    Thanks!

        For b = 3 To 9
            If Cells(25, b).Value > TimeSerial(0, 0, 0) And _
                Cells(25, b).Value <= TimeSerial(13, 0, 0) Then
                    Cells(26, b).Value = OutBoundPerDiem(CityTierRank, 1)
            If Cells(25, b).Value > TimeSerial(13, 0, 0) Then
                Cells(26, b).Value = OutBoundPerDiem(CityTierRank, 2)
            End If
        Next b
    It is supposed to evaluate the departure time in order to enter the correct per diem expense into the cell in row 26. I keep getting a "Next without For" error on debug.
    Last edited by jacob@thepenpoint; 11-12-2013 at 01:46 PM.
    Jacob Albers
    Excel 2003 & 2010

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loop not working...
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2011, 08:12 AM
  2. Loop not working
    By blankus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2009, 04:16 AM
  3. Why is this Do Loop not working right?
    By evilrtc in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-21-2007, 01:52 AM
  4. Loop not working!!
    By Simon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2005, 12:05 PM
  5. Do...Loop not working
    By Sunny Lin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2005, 09:06 PM

Tags for this Thread

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