I wouldn't think that was possible, but I'm not familiar with the BDP functions.
This may wait until the formulas have completed calculating.
![]()
Do Until Application.CalculationState = xlDone: DoEvents: Loop
I wouldn't think that was possible, but I'm not familiar with the BDP functions.
This may wait until the formulas have completed calculating.
![]()
Do Until Application.CalculationState = xlDone: DoEvents: Loop
I tried that but the formulas aren't finishing the calculation process before executing the line to convert the cells to values. Do I have the new line in the correct part of the code?
![]()
Dim LastRow As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row With Sheets("FullFile") .Range("P2:P" & LastRow).FormulaR1C1 = "=IF(LEFT(IF(RC[-2]=""Cusip""," & _ "RC[-3],IF(RC[-1]="""","""",BDP(RC[-1],""ID_CUSIP""))),4)=""#N/A"",""""," & _ "IF(RC[-2]=""Cusip"",RC[-3],IF(RC[-1]="""","""",BDP(RC[-1],""ID_CUSIP""))))" .Range("Q2:Q" & LastRow).FormulaR1C1 = "=IF(LEFT(BDP(RC[-2],""ID_ISIN""),4)=""#N/A"","""",BDP(RC[-2],""ID_ISIN""))" Do Until Application.CalculationState = xlDone: DoEvents: Loop .Range("P2:Q" & LastRow) = .Range("P2:Q" & LastRow).Value End With End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks