Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Using named formula in validation

Hi, I'm having a problem with a complex validation, where the combined length
of the formulas got longer than 256 character, which seems to be the limit on
the Custom formula field under Validation in Excel 2003 (also when doing
conditional formatting?).

For various reasons (mostly related to users), I can't use the obvious
workrounds with a separate cell with the validation test, and I can't put any
macros into the spreadsheet.

So I thought, why not use Named formulas? Alas, this doesn't seem to work,
or at least not the way I expect.

Small example:
define the name Test and make it refer to "=$A$11".
set custom validation on cell $A$1 to "=Test".

Now I expect a warning on the value '0' in cell $A$1, but actually anything
goes.

Am I missing something?
Is there any other way around the size limit on validation formulas, that
does not involve macros or extra cells/sheets?

Cheers /naffats
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Using named formula in validation

Try this way:
define the name Test and make it refer to "=$A$1".
set custom validation on cell $A$1 to "=Test1".


Regards,
Stefi


€žnaffats€ť ezt Ă*rta:

Hi, I'm having a problem with a complex validation, where the combined length
of the formulas got longer than 256 character, which seems to be the limit on
the Custom formula field under Validation in Excel 2003 (also when doing
conditional formatting?).

For various reasons (mostly related to users), I can't use the obvious
workrounds with a separate cell with the validation test, and I can't put any
macros into the spreadsheet.

So I thought, why not use Named formulas? Alas, this doesn't seem to work,
or at least not the way I expect.

Small example:
define the name Test and make it refer to "=$A$11".
set custom validation on cell $A$1 to "=Test".

Now I expect a warning on the value '0' in cell $A$1, but actually anything
goes.

Am I missing something?
Is there any other way around the size limit on validation formulas, that
does not involve macros or extra cells/sheets?

Cheers /naffats

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Using named formula in validation

I works for me in 2003. I added an equal sign in front of the named range in
the source box for the data validation and set the option in the allow box to
List

"naffats" wrote:

Hi, I'm having a problem with a complex validation, where the combined length
of the formulas got longer than 256 character, which seems to be the limit on
the Custom formula field under Validation in Excel 2003 (also when doing
conditional formatting?).

For various reasons (mostly related to users), I can't use the obvious
workrounds with a separate cell with the validation test, and I can't put any
macros into the spreadsheet.

So I thought, why not use Named formulas? Alas, this doesn't seem to work,
or at least not the way I expect.

Small example:
define the name Test and make it refer to "=$A$11".
set custom validation on cell $A$1 to "=Test".

Now I expect a warning on the value '0' in cell $A$1, but actually anything
goes.

Am I missing something?
Is there any other way around the size limit on validation formulas, that
does not involve macros or extra cells/sheets?

Cheers /naffats

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Using named formula in validation

Thanks, but that doesn't solve the problem with the 256 character long
formula; now I have a range named Test, and I'll still have all of the
formula code in the validation formula box.

/naffats

"Stefi" wrote:

Try this way:
define the name Test and make it refer to "=$A$1".
set custom validation on cell $A$1 to "=Test1".


Regards,
Stefi


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Using named formula in validation

Thanks, but there's no problem getting it to work when the name refers to a
range, but I need to use a name that refers to a formula. See my answer to
Stefi ...

/naffats

"Joel" wrote:

I works for me in 2003. I added an equal sign in front of the named range in
the source box for the data validation and set the option in the allow box to
List

"naffats" wrote:

Hi, I'm having a problem with a complex validation, where the combined length
of the formulas got longer than 256 character, which seems to be the limit on
the Custom formula field under Validation in Excel 2003 (also when doing
conditional formatting?).

For various reasons (mostly related to users), I can't use the obvious
workrounds with a separate cell with the validation test, and I can't put any
macros into the spreadsheet.

So I thought, why not use Named formulas? Alas, this doesn't seem to work,
or at least not the way I expect.

Small example:
define the name Test and make it refer to "=$A$11".
set custom validation on cell $A$1 to "=Test".

Now I expect a warning on the value '0' in cell $A$1, but actually anything
goes.

Am I missing something?
Is there any other way around the size limit on validation formulas, that
does not involve macros or extra cells/sheets?

Cheers /naffats



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using named formula in validation

So why can't you put that long formula in a cell on a separate sheet (and hide
that sheet from the user). Then use that cell in the data|validation rule?

naffats wrote:

Hi, I'm having a problem with a complex validation, where the combined length
of the formulas got longer than 256 character, which seems to be the limit on
the Custom formula field under Validation in Excel 2003 (also when doing
conditional formatting?).

For various reasons (mostly related to users), I can't use the obvious
workrounds with a separate cell with the validation test, and I can't put any
macros into the spreadsheet.

So I thought, why not use Named formulas? Alas, this doesn't seem to work,
or at least not the way I expect.

Small example:
define the name Test and make it refer to "=$A$11".
set custom validation on cell $A$1 to "=Test".

Now I expect a warning on the value '0' in cell $A$1, but actually anything
goes.

Am I missing something?
Is there any other way around the size limit on validation formulas, that
does not involve macros or extra cells/sheets?

Cheers /naffats


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Using named formula in validation

Well, that is the way I've ended up doing it -- putting the formulas in a
hidden cell in the same sheet, but outside the reach of the users. Still need
to get this approved by The Mgmt, though -- and that is not a certain thing,
by a long shot.

We can't use macros and would rather not use the hidden cells either because
this spreadsheet, after having data filled in by #¤%¤ users (who don't have
the knowledge to understand what they are doing with Excel, and are working
in an environment where they are not allowed to use a macros-enabled
spreadsheet), is going to be read by a Java application that loads the data
into a fairly critical database.

So we need to make sure the users can't actually screw up the structure of
the spreadsheet, nor enter incorrect data. At the same time we need
to (politely, mind you :-) tell them what is not good with their data.

Cheers /naffats

"Dave Peterson" wrote:

So why can't you put that long formula in a cell on a separate sheet (and hide
that sheet from the user). Then use that cell in the data|validation rule?

naffats wrote:


[removed]

--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using named formula in validation

It sounds like putting the long formula in a cell on separate hidden worksheet
is within the bounds of your rules.

Make sure you protect the workbook's structure so that sheets can't be
moved/added/deleted/shown/hidden, too. (Be aware that this kind of protection
is easily broken.)

And be aware that data|validation isn't very robust. Copy and paste a different
cell onto that cell with data|validation and you'll see.




naffats wrote:

Well, that is the way I've ended up doing it -- putting the formulas in a
hidden cell in the same sheet, but outside the reach of the users. Still need
to get this approved by The Mgmt, though -- and that is not a certain thing,
by a long shot.

We can't use macros and would rather not use the hidden cells either because
this spreadsheet, after having data filled in by #¤%¤ users (who don't have
the knowledge to understand what they are doing with Excel, and are working
in an environment where they are not allowed to use a macros-enabled
spreadsheet), is going to be read by a Java application that loads the data
into a fairly critical database.

So we need to make sure the users can't actually screw up the structure of
the spreadsheet, nor enter incorrect data. At the same time we need
to (politely, mind you :-) tell them what is not good with their data.

Cheers /naffats

"Dave Peterson" wrote:

So why can't you put that long formula in a cell on a separate sheet (and hide
that sheet from the user). Then use that cell in the data|validation rule?

naffats wrote:


[removed]

--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Using named formula in validation

Thanks. Trust me, the sheet and the workbook are both locked down, and we are
doing a lot of validation after reading the data, too. And we've seen all
sorts of strange input ...

Cheers /staffan

"Dave Peterson" wrote:

It sounds like putting the long formula in a cell on separate hidden worksheet
is within the bounds of your rules.

Make sure you protect the workbook's structure so that sheets can't be
moved/added/deleted/shown/hidden, too. (Be aware that this kind of protection
is easily broken.)

And be aware that data|validation isn't very robust. Copy and paste a different
cell onto that cell with data|validation and you'll see.




naffats wrote:

Well, that is the way I've ended up doing it -- putting the formulas in a
hidden cell in the same sheet, but outside the reach of the users. Still need
to get this approved by The Mgmt, though -- and that is not a certain thing,
by a long shot.

We can't use macros and would rather not use the hidden cells either because
this spreadsheet, after having data filled in by #¤%¤ users (who don't have
the knowledge to understand what they are doing with Excel, and are working
in an environment where they are not allowed to use a macros-enabled
spreadsheet), is going to be read by a Java application that loads the data
into a fairly critical database.

So we need to make sure the users can't actually screw up the structure of
the spreadsheet, nor enter incorrect data. At the same time we need
to (politely, mind you :-) tell them what is not good with their data.

Cheers /naffats

"Dave Peterson" wrote:

So why can't you put that long formula in a cell on a separate sheet (and hide
that sheet from the user). Then use that cell in the data|validation rule?

naffats wrote:


[removed]

--

Dave Peterson


--

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
Validation; add items to named range Ixtreme Excel Discussion (Misc queries) 5 July 17th 09 11:01 PM
Data Validation and named lists PGP Excel Worksheet Functions 2 February 16th 07 02:10 AM
Named Range name problem in validation TimD Excel Worksheet Functions 3 January 16th 07 07:09 PM
Validation protection with named ranges Ben H Excel Worksheet Functions 1 March 17th 06 03:49 AM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM


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

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

About Us

"It's about Microsoft Excel"