bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I have a macro running through 300+ rows of data just fine then suddenly I get the Type Mismatch error and I just cannot figure out why. Here's the portion of my code that's causing this. It bombs out on the If statement. Any help would be most appreciated.
rownum = 2
counter = 2
For counter = counter To finalrowd
If Worksheets("data").Cells(rownum, paid) = "Paid" And Worksheets("data").Cells(rownum, finalcol + 4) <= Worksheets("data").Cells(rownum, salesprice) And Worksheets("data").Cells(rownum, finalcol + 3) = "WLCRdM" Then
comm2 = Worksheets("data").Cells(rownum, amount) * com2
Worksheets("data").Cells(rownum, finalcol + 2) = comm2
End If
rownum = rownum + 1
Next counter
rownum = 2
counter = 2
For counter = counter To finalrowd
If Worksheets("data").Cells(rownum, paid) = "Paid" And Worksheets("data").Cells(rownum, finalcol + 4) <= Worksheets("data").Cells(rownum, salesprice) And Worksheets("data").Cells(rownum, finalcol + 3) = "WLCRdM" Then
comm2 = Worksheets("data").Cells(rownum, amount) * com2
Worksheets("data").Cells(rownum, finalcol + 2) = comm2
End If
rownum = rownum + 1
Next counter