Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
Por cleomar
#9803
Boa tarde turma, olha só Estou com um probleminha que não estou conseguindo encontrar a solução.
quero salvar em um determinada celula a formula descrita abaixo atraves de um formulario

= "=IF([@[und/kg]]=""kg"",VLOOKUP([DESCRIÇÃO],'CADASTRO PRODUTOS'!C[-3]:C[6],3,0),IF([und/kg]=""und"",VLOOKUP([DESCRIÇÃO],'CADASTRO PRODUTOS'!C[-3]:C[6],7,0)))"""

no entando, esta dando erro de execução e ja tentei por varias vezes e não percebi onde esta o erro.

Por favor, alguem poderia me ajudar?
Por cleomar
#9841
Boa tarde JonathãLuis
A formula a ser aplicada em uma célula do Excel seria a seguinte:
=SE([@[und/kg]]="kg";PROCV([DESCRIÇÃO];'CADASTRO PRODUTOS'!B:K;3;0);SE([und/kg]="und";PROCV([DESCRIÇÃO];'CADASTRO PRODUTOS'!B:K;7;0)))
sendo que [und/kg] e [descrição] seriam o cabeçalho de uma tabela.

Desde ja te agradeço.
Por orosolin2
Posts
#9842
Olá @cleomar,

Por acaso já tentou colocar a fórmula manualmente na célula, ir no VBA (Alt+F11) e na janela de Verificação Imediata (Ctrl+G) digitar de dar [Enter]:
Código: Selecionar todos
?ActiveCell.Formula
ou
Código: Selecionar todos
?ActiveCell.FormulaR1C1
E depois copiar o resultado e colar na instrução VBA que está montando?
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord