View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
bhavna bhavna is offline
external usenet poster
 
Posts: 6
Default How do I add an item with comma in the list of data validation

Let me be more clear.
In my excel file I read data from SQL server. Therefore when I get data from
server I save it in a comma delimited string as I apply this for data
validation list. All this happens in background with VBA. I don't want user
to see the data. User just see the list of choices for the given column.

If you or anyone have other suggestion will be helpful
Thanks
--
bprajap


"Gord Dibben" wrote:

Why are you storing the list of values in a comma de-limited string?

Why use a string? Just use the range of values as your source.

Select a cell then DataValidationList

In the "source" dialog enter =$F$1:$F$12 assuming that is your range of
values that you imported from the database.

Or create a defined name for the list.

Select the range of cells then

InsertNameDefine name it MyList

In source enter =MyList

If you are using another sheet or workbook, the defined name method is the
only one you can use.


Gord Dibben MS Excel MVP


On Wed, 10 Sep 2008 09:08:00 -0700, bhavna
wrote:

Hi Gord

I tried to use the range but doesn't work in my case.
I am getting the list of values from the database and I am storing that in a
comma delimited string. I tried if can copy that string into range but it
doesn't work. If you or anyone has suggestions then please help me.

Thanks