View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jzamilpa3@yahoo.com is offline
external usenet poster
 
Posts: 48
Default coding help to set a specific time frame

the restriction or known as IF is suppused to look at 2 cells to get a
date time frame. cell1 is 6/1/2007 and cell2 5/31/2008. i need it to
look between that time frame or any dates inserted into those 2
cells. evrything works correctly except the IF and ENDIF

For a = 2 To 500
'If Sheet2.Cells(a, 2) = Sheet12.Cells(6, 3) And Sheet2.Cells(a,
2) <= Sheet12.Cells(6, 4) Then
strBlah = Sheet2.Cells(a, 7)
Sheet12.Cells(g, 1) = strBlah
Sheet12.Cells(g, 2) = Sheet2.Cells(a, 15)
Sheet12.Cells(g, 3) = Sheet2.Cells(a, 4) & " " &
Sheet2.Cells(a, 9) & " " & Sheet2.Cells(a, 11) & " Phn#:" &
Sheet2.Cells(a, 12)
Sheet12.Cells(g, 4) = Sheet2.Cells(a, 17)
g = g + 1
'End If
Next a