Do Loop not working

Hi Guys, can anyone tell me why this piece of my code is not working ?

ElseIf Cells(i, 6).Value = "LDCFICOT1A" Then
Cells(i, 25).Value = "8631"
Cells(i, 30).Value = "Bond Pricing diff btw MX and GBO"

Cells(i, 31).Value = "IT Rec Issue - FO MTM on Bonds (MTM folder)"

Cells(i, 32).Value = "JC"
Cells(i, 34).Value = "3842"

Cells(i, 33).Value = "0"
Cells(i, 36).Value = "05/09/2011"
Who is Participating?
Rory ArchibaldConnect With a Mentor Commented:
I used a debug.assert to break the code when i hit the row number of interest, then stepped through to see what was being executed.
Rory ArchibaldCommented:
Not working in what sense? (there isn't any code in that file)
JustincutAuthor Commented:
For some reason, its not populating those Cells. Here's the attachment with Macro.
Rory ArchibaldCommented:
It's because the only row that matches that criterion also matches one of your previous If statements:
ElseIf Cells(i, 8).Value = "-3848015, -5132700, -4986040, -6783900, -6881113, -6764890, -6881026, -3862199, -3847999, -4984470" Then

so the line that populates the other cells is never executed.
JustincutAuthor Commented:
Cool! Can you tell me how you found out? Did you use the immediate window?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.