Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default If statements in Data Validation

I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 389
Default If statements in Data Validation

Data validation should return a True or False value.

I've looked at that formula and can't figure out what you want to do, but it
is clear it is not returning a true or false value.

When doing custom data validation, it can be helpful to construct the
formula in the worksheet so that you can see it and debug it easily. Then
when it's working copy it to the data validation dialog.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below
C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 389
Default If statements in Data Validation

After seeing John's answer I see what you want to do now. Not sure why I
thought you were trying to do a custom formula.

Another way for the validation (list).

=IF(C70,B399:B400,INDIRECT(ADDRESS(ROW(),COLUMN() )))

If the criteria is not met, the list is itself (a single cell). Pretty cool
how Excel lets you perform self-referencing in validation.


--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility



"Tim Zych" <tzych@NOSp@mE@RTHLINKDOTNET wrote in message
...
Data validation should return a True or False value.

I've looked at that formula and can't figure out what you want to do, but
it is clear it is not returning a true or false value.

When doing custom data validation, it can be helpful to construct the
formula in the worksheet so that you can see it and debug it easily. Then
when it's working copy it to the data validation dialog.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below
C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default If statements in Data Validation

Kind of ugly.....

Assuming the ranges you are having in the drop down lists are named, (i.e.:
through Insert--Name--Define, etc.), you could have a NullRange defined (a
single absolute cell with no data, i.e.: $IV$65536 named Null Range (don't
put it on your sheet, just use the insert name define).

Then in the cells that have the drop down boxes, you can have
Data--Validation, choose list, and your source could be as follows:

=INDIRECT(IF(C7=0,"NullRange","")&IF(C7<0,"TheRan ge",""))

--
John C


"lost and confused in excel-land" wrote:

I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default If statements in Data Validation

=IF(c70,=$B$399:$B$400,"")

Try this:

=IF(C70,$B$399:$B$400)

Note that the drop arrow will still display but you won't be able to make a
selection if C70 = FALSE.

--
Biff
Microsoft Excel MVP


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below
C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 389
Default If statements in Data Validation

I tried this but it didn't let me enter the validation formula if C7
evaluated to False. The error was: "The list source must be a delimited
list, or reference to single row or column".

Enters fine when C7 evaluates to True.

I like this one the best.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"T. Valko" wrote in message
...
=IF(c70,=$B$399:$B$400,"")


Try this:

=IF(C70,$B$399:$B$400)

Note that the drop arrow will still display but you won't be able to make
a selection if C70 = FALSE.

--
Biff
Microsoft Excel MVP


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below
C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default If statements in Data Validation

Everyone has been most helpful...I changed the structure of the file and was
able to accomplish what I needed to do. I appreciate the help. Still
learning, and asking plenty of questions...thanks for the tips and patience.


"Tim Zych" wrote:

I tried this but it didn't let me enter the validation formula if C7
evaluated to False. The error was: "The list source must be a delimited
list, or reference to single row or column".

Enters fine when C7 evaluates to True.

I like this one the best.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"T. Valko" wrote in message
...
=IF(c70,=$B$399:$B$400,"")


Try this:

=IF(C70,$B$399:$B$400)

Note that the drop arrow will still display but you won't be able to make
a selection if C70 = FALSE.

--
Biff
Microsoft Excel MVP


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells below
C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work either.


Many, MANY thanks !!!







  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default If statements in Data Validation

Another way:

=IF(C70,$B$399:$B$400,NA())

If you get the message: The source currenty evaluates to an error........

Just answer YES.

--
Biff
Microsoft Excel MVP


"Tim Zych" <tzych@NOSp@mE@RTHLINKDOTNET wrote in message
...
I tried this but it didn't let me enter the validation formula if C7
evaluated to False. The error was: "The list source must be a delimited
list, or reference to single row or column".

Enters fine when C7 evaluates to True.

I like this one the best.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"T. Valko" wrote in message
...
=IF(c70,=$B$399:$B$400,"")


Try this:

=IF(C70,$B$399:$B$400)

Note that the drop arrow will still display but you won't be able to make
a selection if C70 = FALSE.

--
Biff
Microsoft Excel MVP


"lost and confused in excel-land"
. com wrote in message
...
I have a vlookup statement in cell c7 that returns a value based on a
drop
down list in C6.

I have other dropdown lists below C6 (D6, E6, F6...) that allow various
choices. HOWEVER - they should not even appear if C7 returns a 0.

I wanted to put in an IF statement in the data validation for cells
below C6
that say =IF(c70,=$B$399:$B$400,"") I keep getting an error. I think
it
has something to do with the =

I tried:

=if(c70,vlookup($B$399:$B$400," ")) and it doesn't want to work
either.


Many, MANY thanks !!!








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 - IF statements CC[_3_] New Users to Excel 7 September 10th 07 05:58 AM
14 Nested IF statements creating different validation lists Jive Bunny Excel Worksheet Functions 6 July 2nd 06 10:15 PM
Complex Vlookup and List Validation and Nested IF statements Bobby Excel Worksheet Functions 2 March 9th 06 05:37 PM
If statements with validation lists Tony Houston Excel Worksheet Functions 7 September 1st 05 06:25 PM
Data Validation w/ If, Match & Index Statements Dominique Feteau Excel Worksheet Functions 2 December 18th 04 08:15 AM


All times are GMT +1. The time now is 02:15 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"