Problema com espaços no nome do caminho na macro do Excel

1

A definição do VLOOKUP é:

=IF(ISNA(VLOOKUP(RC[-7],'[\sqlc\Curr table & Checklist\Currency table - foreign.xlsx]Sheet1'!R2C1:R9999C2,2,FALSE))=FALSE,VLOOKUP(RC[-7],'[\sqlc\Curr table & Checklist\Currency table - foreign.xlsx]Sheet1'!R2C1:R9999C2,2,FALSE),""No a/c"")

O Excel está causando um erro devido ao espaço entre 'Curr' e 'table' no nome do caminho (e também ficaria chateado com os seguintes espaços no nome do caminho também).

Q: Onde eu insiro marcas de fala (") para superar o problema. Já tentei várias opções, mas sem sorte até agora.

    
por Nigel 29.08.2013 / 17:06

1 resposta

1

Você coloca aspas (") ao redor do caminho inteiro.

Nesse caso, seu código deve ficar assim:

=IF(ISNA(VLOOKUP(RC[-7],'["\sqlc\Curr table & Checklist\Currency table - foreign.xlsx"]Sheet1'!R2C1:R9999C2,2,FALSE))=FALSE,VLOOKUP(RC[-7],'[\sqlc\Curr table & Checklist\Currency table - foreign.xlsx]Sheet1'!R2C1:R9999C2,2,FALSE),""No a/c"")
    
por 29.08.2013 / 17:11