Dim
ggge
As
Long
Dim
gggf
As
Long
With
Worksheets(
"Sheet1"
)
ggga = .Range(
"LA1"
).Column
gggb = .Range(
"BOJ1"
).Column
gggc = .Range(
"BQC1"
).Column
gggd = .Range(
"DTL1"
).Column
For
ggge = ggga
To
gggb
For
gggf = gggc
To
gggd
If
.Cells(
"BPK2"
).Value = .Cells(
"HX2"
)
And
_
.Cells(ggge, 3).Value =
"0"
And
_
.Cells(gggf, 3).Value = 1
And
_
.Cells(ggge, 1).Value >= .Cells(ggge, 36)
And
_
.Cells(ggge, 1).Value <= .Cells(ggge, 37)
Then
.Cells(ggge, 5).Value =
"1"
Else
.Cells(ggge, 5).Value =
"0"
End
If
Next
End
With