Home If - Cant add more "Then's"?
Reply: 0

If - Cant add more "Then's"?

user476
1#
user476 Published in May 20, 2018, 11:58 am

In the below code, only the first line after "Then" works - How do i add more "Then's"?

Sub Opgave2()
Dim tidligst As Date
tidligst = WorksheetFunction.Min(Worksheets("Base").Range("d2:d18288"))
For i = 2 To 18288
    If Worksheets("Base").Cells(i, 4) = tidligst Then Worksheets("Tidligst Indskrevne").Cells(i, 2) = tidligst
    Worksheets("Tidligst Indskrevne").Cells(i, 3) = Worksheets("Base").Cells(i, 12)
End If


Next i
End Sub
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.308675 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO