Thanks for the quick reply Holger. I tried your suggestion, but it still didn't work. The formula for cells in column D would just display =BDP("C","CALLED_DT"). I need it to actually reference what is in column C and use that in the formula. I revised the code a little and here's what I have now. I'm having the same problem though. Formula in column D is displaying as =BDP("rng3.Value","CALLED_DT").
Sub Backup()
'
' Backup Macro
' backup of call cusips formatting
For Each ws In Sheets
ws.Activate
Dim A As Long, B As Long
A = Range("B" & Rows.Count).End(xlUp).Row
For B = A To 1 Step -1
Set rng1 = Range("A" & B)
Set rng2 = Range("B" & B)
Set rng3 = Range("C" & B)
Set rng4 = Range("D" & B)
Set rng5 = Range("E" & B)
Set rng6 = Range("F" & B)
'Define Security Type so BB can read
If rng2.Value Like "AGY*" Then rng3.Value = rng1.Value & " Corp"
If rng2.Value Like "CD*" Then rng3.Value = rng1.Value & " Corp"
If rng2.Value Like "CORP*" Then rng3.Value = rng1.Value & " Corp"
If rng2.Value Like "MUNI*" Then rng3.Value = rng1.Value & " Muni"
If rng2.Value Like "PREF*" Then rng3.Value = rng1.Value & " Pfd"
If rng2.Value Like "PRST*" Then rng3.Value = rng1.Value & " Pfd"
If rng2.Value Like "FOREIGN*" Then rng3.Value = rng1.Value & " Corp"
'Look up BB Data Points
If rng3.Value Like "*Corp" Then rng4.Formula = "=BDP(""rng3.Value"", ""CALLED_DT"")"
If rng3.Value Like "*Corp" Then rng5.Formula = "=BDP(""rng3.Value"", ""CALLED_PX"")"
If rng3.Value Like "*Corp" Then rng6.Formula = "=BDP(""rng3.Value"", ""MOST_RECENT_REPORTED_FACTOR"")"
If rng3.Value Like "*Muni" Then rng4.Formula = "=BDP(""rng3.Value"", ""MUNI_RECENT_REDEMP_DT"")"
If rng3.Value Like "*Muni" Then rng5.Formula = "=BDP(""rng3.Value"", ""MUNI_RECENT_REDEMP_PX"")"
If rng3.Value Like "*Muni" Then rng6.Formula = "=BDP(""rng3.Value"", ""MUNI_RECENT_REDEMP_TYP"")"
If rng3.Value Like "*Pfd" Then rng4.Formula = "=BDP(""rng3.Value"", ""CALLED_DT"")"
If rng3.Value Like "*Pfd" Then rng5.Formula = "=BDP(""rng3.Value"", ""CALLED_PX"")"
Next B
Next ws
Application.ScreenUpdating = True
Application.DisplayStatusBar = True
End Sub
Bookmarks