Problem to calculate cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a macro wicht is putting in a cell a formula vlookup(....). But Excel does not calculate it, I have a #Name error until I click on it. I have ask excel to calculate the cell but it doe not change anything. I am working with Excel 2000. Is it a bug of excel 2000 or is there a way to obtain than excel calculate it ?
Thanks for any help and happy new year.
Benjamin
 
Please show us the code that you are using.
the error you give suggests a typing mistake


-----Original Message-----
Hi,
I have a macro wicht is putting in a cell a formula
vlookup(....). But Excel does not calculate it, I have a
#Name error until I click on it. I have ask excel to
calculate the cell but it doe not change anything. I am
working with Excel 2000. Is it a bug of excel 2000 or is
there a way to obtain than excel calculate it ?
 
oki
This is a simplified code but I have the same problem :
In A1 put "poui"
in F1 put "poui", in F2 put "grr"
in G1 put 1 in G2 put 2
the code:
public sub maisquestcequisepasse()

range("B1").select
activecell.formulaR1C1 ="=vlookup(RC[-1],F:G,2,false)

end sub

I just think I may have find it: VBA does not understand F:G........
GRRR I am stupid !!!!!!!!!!!!!!!!!!!!
Thanks for help Patrick and have a nice year
Benjamin
 
Back
Top