Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
D. D. is offline
external usenet poster
 
Posts: 53
Default if and then

Hi I am having a problem with this code, it gets stuck in a loop even
when I set it up to work

The Start and Finish ranges are dates

Sheets("Sheet1").Select
Range("E2").Select
Do Until ActiveCell = ""

If ActiveCell.Value = Range("Start") Then
If ActiveCell.Value <= Range("Finish") Then
ActiveCell.Rows("1:1").EntireRow.Copy
Destination:=Sheets("Sheet2").Range("A4000").End(x lUp).Offset(3, 0)

ActiveCell.Offset(1, 0).Range("A1").Select

End If
End If

Loop

ActiveCell.Columns("A:F").EntireColumn.EntireColum n.AutoFit


I have all the date ranges formated as "mmm. dd, yyyy"


Thanks for the help.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"