teatimecrumpet
Active Member
- Joined
- Jun 23, 2010
- Messages
- 307
Hi,
I'm using some vba code to insert a column and then place a formula for a vlookup. But the resulting cells with formulas are not calculating instead it is showing up as a string.
Also, as a test I could not place in a basic formula into thos cells after the script ran: I put in "=2+2" and it would just who it as a string.
Now if input that basic formula elsewhere in the sheet it's ok.
I am using Excel 2007 and also tried to use the Formula ribbon to calculate the sheet both manually and automatically but nothing.
Does this have something to do with using the "Filldown" operation?
As always thanks!
here's my code:
'add column for vlookup of names
Columns("N").Insert
Range("N1").Formula = "Names"
Range("N2").Formula = "=VLOOKUP(M2,'C:\Users\teatimecrumpet\Desktop\[_FINAL_Name_ITEMS_VBA.xlsx]UniQ-Names-Final'!$E$1:$G$51,3,FALSE)"
Range("M65536").End(xlUp).Offset(0, 1).Select
Selection.Formula = "1"
Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown
I'm using some vba code to insert a column and then place a formula for a vlookup. But the resulting cells with formulas are not calculating instead it is showing up as a string.
Also, as a test I could not place in a basic formula into thos cells after the script ran: I put in "=2+2" and it would just who it as a string.
Now if input that basic formula elsewhere in the sheet it's ok.
I am using Excel 2007 and also tried to use the Formula ribbon to calculate the sheet both manually and automatically but nothing.
Does this have something to do with using the "Filldown" operation?
As always thanks!
here's my code:
'add column for vlookup of names
Columns("N").Insert
Range("N1").Formula = "Names"
Range("N2").Formula = "=VLOOKUP(M2,'C:\Users\teatimecrumpet\Desktop\[_FINAL_Name_ITEMS_VBA.xlsx]UniQ-Names-Final'!$E$1:$G$51,3,FALSE)"
Range("M65536").End(xlUp).Offset(0, 1).Select
Selection.Formula = "1"
Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown