LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 12
Default Doesn't Add Up

Hi,
the third 'If' statement is supposed to count all of the dates in the
7th column & not the blank cells. Any idea why it won't work (returns a
result of '0') Like I said before, novice!
Cheers.

Dim i As Integer, c As Integer, d As Integer, e As Integer
d = 0
c = 0
e = 0

For i = 27 To 321



If Cells(i, 6).Value < Now Then
d = d + 1


If Cells(i, 6).Value < Now And Cells(i, 7).Value = "" Then
c = c + 1

If Cells(i, 7).Value < "" Then
e = e + 1

End If
End If
End If

Next i


 
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 11:51 PM.

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"