Comma in Function Argument name treated as separator

  • Thread starter Error trying to sort in a Macro
  • Start date
E

Error trying to sort in a Macro

I am referencing an internet based workbook in a Vlookup function that has a
comma in the internet address. The problem is that Excel is treating the
comma in the name as the separator for the arguments. Is there a way around
this?

eg.

The workbook is at
http://some_server_name/John Smith Company, Inc/Report.xls

I am using:
Vlookup(A2, 'http://some_server_name/John Smith Company,
Inc/[Report.xls]Data'!$A$2:$Z$45, 8, 0)


It is treating the comma between "Company" and "Inc" as the comma between
"$A$2:$C$45" and "8"

Thanks,
Ken
 
N

Niek Otten

Hi Ken,

You need quotes (") around the argument

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I am referencing an internet based workbook in a Vlookup function that has a
| comma in the internet address. The problem is that Excel is treating the
| comma in the name as the separator for the arguments. Is there a way around
| this?
|
| eg.
|
| The workbook is at
| http://some_server_name/John Smith Company, Inc/Report.xls
|
| I am using:
| Vlookup(A2, 'http://some_server_name/John Smith Company,
| Inc/[Report.xls]Data'!$A$2:$Z$45, 8, 0)
|
|
| It is treating the comma between "Company" and "Inc" as the comma between
| "$A$2:$C$45" and "8"
|
| Thanks,
| Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top