ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   coding help to set a specific time frame (https://www.excelbanter.com/excel-programming/410807-coding-help-set-specific-time-frame.html)

[email protected]

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


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com