create a vlookup formula with VBA
Hi,
I want to introduce 3 formulas in a range.the code is below and it always gets stuck in the vlookup formulas. I must be blind because I cannot see the error. thanks a million PA For i = 8 To 100 Cells(i, 19).Formula = "=VALUE(T" & i & ")" Cells(i, 17).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 2;FALSE)" Cells(i, 18).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 3;FALSE)" Next |
create a vlookup formula with VBA
Change your semicolons to commas.
VBA is USA centric. But when the formulas are plopped into the cell, all will be ok with the world. PA wrote: Hi, I want to introduce 3 formulas in a range.the code is below and it always gets stuck in the vlookup formulas. I must be blind because I cannot see the error. thanks a million PA For i = 8 To 100 Cells(i, 19).Formula = "=VALUE(T" & i & ")" Cells(i, 17).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 2;FALSE)" Cells(i, 18).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 3;FALSE)" Next -- Dave Peterson |
create a vlookup formula with VBA
Try replacing the semicolons with commas.
-- Jim Cone Portland, Oregon USA "PA" wrote in message Hi, I want to introduce 3 formulas in a range.the code is below and it always gets stuck in the vlookup formulas. I must be blind because I cannot see the error. thanks a million PA For i = 8 To 100 Cells(i, 19).Formula = "=VALUE(T" & i & ")" Cells(i, 17).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 2;FALSE)" Cells(i, 18).Formula = "=VLOOKUP(S" & i & ";Tabela!B:D; 3;FALSE)" Next |
All times are GMT +1. The time now is 06:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com