Justincut
asked on
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"
DummyRec8.xlsx
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"
DummyRec8.xlsx
Not working in what sense? (there isn't any code in that file)
ASKER
For some reason, its not populating those Cells. Here's the attachment with Macro.
DummyRec8.xlsm
DummyRec8.xlsm
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.
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.
ASKER
Cool! Can you tell me how you found out? Did you use the immediate window?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.