Link to home
Start Free TrialLog in
Avatar of Justincut
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
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Not working in what sense? (there isn't any code in that file)
Avatar of Justincut
Justincut

ASKER

For some reason, its not populating those Cells. Here's the attachment with Macro.
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.
Cool! Can you tell me how you found out? Did you use the immediate window?
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial