ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Custom list - how to include commas? (https://www.excelbanter.com/setting-up-configuration-excel/22840-custom-list-how-include-commas.html)

Mike

Custom list - how to include commas?
 
In Excel 2002 (or any version), under Tools, Options, Custom Lists, you can
either manually enter list items (separated by a comma or new line) or
import them. If you manually enter them, the entries themselves cannot
include a comma. However, if you *import* the list, the comma is okay.
I've tried delimiting with a single quote, double quotes, and using no
comma, but Excel breaks up the line at the comma. Is there a way, aside
from importing, to have a comma as part of the custom list entry? TIA,

Mike



Dave Peterson

How about via a macro?

Option Explicit
Sub testme()
Dim myList As Variant
myList = Array("asdf,qwer", "1234,ertw")
Application.AddCustomList myList
End Sub




Mike wrote:

In Excel 2002 (or any version), under Tools, Options, Custom Lists, you can
either manually enter list items (separated by a comma or new line) or
import them. If you manually enter them, the entries themselves cannot
include a comma. However, if you *import* the list, the comma is okay.
I've tried delimiting with a single quote, double quotes, and using no
comma, but Excel breaks up the line at the comma. Is there a way, aside
from importing, to have a comma as part of the custom list entry? TIA,

Mike


--

Dave Peterson

Mike

Perfect! Thanks,

Mike

"Dave Peterson" wrote in message
...
How about via a macro?

Option Explicit
Sub testme()
Dim myList As Variant
myList = Array("asdf,qwer", "1234,ertw")
Application.AddCustomList myList
End Sub




Mike wrote:

In Excel 2002 (or any version), under Tools, Options, Custom Lists, you

can
either manually enter list items (separated by a comma or new line) or
import them. If you manually enter them, the entries themselves cannot
include a comma. However, if you *import* the list, the comma is okay.
I've tried delimiting with a single quote, double quotes, and using no
comma, but Excel breaks up the line at the comma. Is there a way, aside
from importing, to have a comma as part of the custom list entry? TIA,

Mike


--

Dave Peterson





All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com