Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default validation list with comma values?

Hello,
I am trying to create programmatically a validation list that contains comma
values and I cant get it to work.

In Excels validation dialog I can manually enter the formula in the filed
which works fine (; separated list for example: 1,0;1,2 ...)

I if enter this via VBA as Formula1 "1,0;1,2" things get messed up:
1. Value: 1
2. Value: 0;1
3. Value: 2

The Problem is that the values are calculated at runtime so I can't enter
them in the dialog and the list is needed because the user will only known
the approximate and not the exact values which can be entered and they will
have some more decimal places.
Last but not least an analyzing software which runs over the sheet doesn't
allow that there are any hidden columns or values so I can't just make an
reference to a range which contains the values...

Now the question is, if is this possible to do or has Microsoft totally
messed up the validation.add function??

Any help is appreciated!

Kind regards,
Sebastian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default validation list with comma values?

I think you were hit by VBA being USA centric.

If I enter 1,0;1,2 directly in the data|validation dialog (with comma my list
separator), I get what you get from your code.

Can you put the values in a range on a hidden worksheet and use them from there?

Can you use a different character than comma?
1-0,1-2,1-3...

Maybe use another cell to change the dash back to comma if you really need it:
=substitute(a1,"-",",")

Sebastian wrote:

Hello,
I am trying to create programmatically a validation list that contains comma
values and I cant get it to work.

In Excels validation dialog I can manually enter the formula in the filed
which works fine (; separated list for example: 1,0;1,2 ...)

I if enter this via VBA as Formula1 "1,0;1,2" things get messed up:
1. Value: 1
2. Value: 0;1
3. Value: 2

The Problem is that the values are calculated at runtime so I can't enter
them in the dialog and the list is needed because the user will only known
the approximate and not the exact values which can be entered and they will
have some more decimal places.
Last but not least an analyzing software which runs over the sheet doesn't
allow that there are any hidden columns or values so I can't just make an
reference to a range which contains the values...

Now the question is, if is this possible to do or has Microsoft totally
messed up the validation.add function??

Any help is appreciated!

Kind regards,
Sebastian


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default validation list with comma values?

Thank your for your reply.
I can't use another separator because this value will be used in another
formula :-/

And as far as I know and just tested, you can't assign a range to the
validate property that is on another sheet :-(

"Dave Peterson" wrote:

I think you were hit by VBA being USA centric.

If I enter 1,0;1,2 directly in the data|validation dialog (with comma my list
separator), I get what you get from your code.

Can you put the values in a range on a hidden worksheet and use them from there?

Can you use a different character than comma?
1-0,1-2,1-3...

Maybe use another cell to change the dash back to comma if you really need it:
=substitute(a1,"-",",")

Sebastian wrote:

Hello,
I am trying to create programmatically a validation list that contains comma
values and I can€„¢t get it to work.

In Excels validation dialog I can manually enter the formula in the filed
which works fine (; separated list for example: 1,0;1,2 ...)

I if enter this via VBA as Formula1 "1,0;1,2" things get messed up:
1. Value: 1
2. Value: 0;1
3. Value: 2

The Problem is that the values are calculated at runtime so I can't enter
them in the dialog and the list is needed because the user will only known
the approximate and not the exact values which can be entered and they will
have some more decimal places.
Last but not least an analyzing software which runs over the sheet doesn't
allow that there are any hidden columns or values so I can't just make an
reference to a range which contains the values...

Now the question is, if is this possible to do or has Microsoft totally
messed up the validation.add function??

Any help is appreciated!

Kind regards,
Sebastian


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default validation list with comma values?

Hi Sebastian.

And as far as I know and just tested, you can't assign a range to the
validate property that is on another sheet :-(


Try naming the remote range and use the name in the DV list box, e,g.:

=MyList

---
Regards,
Norman



"Sebastian" wrote in message
...
Thank your for your reply.
I can't use another separator because this value will be used in another
formula :-/

And as far as I know and just tested, you can't assign a range to the
validate property that is on another sheet :-(

"Dave Peterson" wrote:

I think you were hit by VBA being USA centric.

If I enter 1,0;1,2 directly in the data|validation dialog (with comma my
list
separator), I get what you get from your code.

Can you put the values in a range on a hidden worksheet and use them from
there?

Can you use a different character than comma?
1-0,1-2,1-3...

Maybe use another cell to change the dash back to comma if you really
need it:
=substitute(a1,"-",",")

Sebastian wrote:

Hello,
I am trying to create programmatically a validation list that contains
comma
values and I can?Tt get it to work.

In Excels validation dialog I can manually enter the formula in the
filed
which works fine (; separated list for example: 1,0;1,2 ...)

I if enter this via VBA as Formula1 "1,0;1,2" things get messed up:
1. Value: 1
2. Value: 0;1
3. Value: 2

The Problem is that the values are calculated at runtime so I can't
enter
them in the dialog and the list is needed because the user will only
known
the approximate and not the exact values which can be entered and they
will
have some more decimal places.
Last but not least an analyzing software which runs over the sheet
doesn't
allow that there are any hidden columns or values so I can't just make
an
reference to a range which contains the values...

Now the question is, if is this possible to do or has Microsoft totally
messed up the validation.add function??

Any help is appreciated!

Kind regards,
Sebastian


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default validation list with comma values?

Thnak you very much, this really works!
Anyway this is a solution I can live with, calculating the data on another
sheet as temporary storage... ;-)

"Norman Jones" wrote:

Hi Sebastian.

And as far as I know and just tested, you can't assign a range to the
validate property that is on another sheet :-(


Try naming the remote range and use the name in the DV list box, e,g.:

=MyList

---
Regards,
Norman



"Sebastian" wrote in message
...
Thank your for your reply.
I can't use another separator because this value will be used in another
formula :-/

And as far as I know and just tested, you can't assign a range to the
validate property that is on another sheet :-(

"Dave Peterson" wrote:

I think you were hit by VBA being USA centric.

If I enter 1,0;1,2 directly in the data|validation dialog (with comma my
list
separator), I get what you get from your code.

Can you put the values in a range on a hidden worksheet and use them from
there?

Can you use a different character than comma?
1-0,1-2,1-3...

Maybe use another cell to change the dash back to comma if you really
need it:
=substitute(a1,"-",",")

Sebastian wrote:

Hello,
I am trying to create programmatically a validation list that contains
comma
values and I canâ?Tt get it to work.

In Excels validation dialog I can manually enter the formula in the
filed
which works fine (; separated list for example: 1,0;1,2 ...)

I if enter this via VBA as Formula1 "1,0;1,2" things get messed up:
1. Value: 1
2. Value: 0;1
3. Value: 2

The Problem is that the values are calculated at runtime so I can't
enter
them in the dialog and the list is needed because the user will only
known
the approximate and not the exact values which can be entered and they
will
have some more decimal places.
Last but not least an analyzing software which runs over the sheet
doesn't
allow that there are any hidden columns or values so I can't just make
an
reference to a range which contains the values...

Now the question is, if is this possible to do or has Microsoft totally
messed up the validation.add function??

Any help is appreciated!

Kind regards,
Sebastian

--

Dave Peterson




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation - List of unique values Oscar Excel Discussion (Misc queries) 2 February 17th 10 01:59 PM
How do I add an item with comma in the list of data validation bhavna Excel Discussion (Misc queries) 9 October 2nd 08 04:13 PM
How to update edited values in validation list? royend Excel Discussion (Misc queries) 1 August 31st 07 03:37 PM
List cell values seperated by comma if criteria met Mike Pearson[_2_] Excel Worksheet Functions 2 June 2nd 07 10:31 PM
Show comma in data validation list? [email protected] Excel Discussion (Misc queries) 7 May 17th 05 02:07 AM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"