Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
andrewm
 
Posts: n/a
Default prevent more than one value in a cell


Hi I am making a roster with the use of lookup (see below) - names say
"andrew" and "am".
I want only one name in either a1:a10 or a15:a20 either "andrew" or
"am", but not both - is it a validation or vba or help

andrew m

=IF(ISNUMBER(MATCH("andrew",K15:K16,0)),VLOOKUP(MA TCH("andrew",K15:K16,0),J25:K29,2),IF(ISNUMBER(MAT CH("am",K19:K21,0)),VLOOKUP(MATCH("am",K19:K21,0), J25:L29,3),""))


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380377

  #2   Report Post  
olasa
 
Posts: n/a
Default


As I interpreted it..."andrew" or "am" but only One, shall be in the
range:

To check the range:
=IF(SUM(COUNTIF(A1:A10,{"andrew";"am"})+COUNTIF(A1 5:A20,{"andrew";"am"}))=1,"Correct","Wrong")

To do a Validation: (Allow:Custom)
SUM(COUNTIF($A$1:$A$10,{"andrew";"am"})+COUNTIF($A $15:$A$20,{"andrew";"am"}))=1

Hope it helped
Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=380377

  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

I don't understand exactly what you're looking for, particularly when you
mention A1:A10 and A15:A20?!?!

Since no one else has ventured a suggestion, you can assume that your post
is confusing to *everyone*.

Staying in this thread, try explaining in a different manner, exactly what
you're looking for.

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"andrewm" wrote in
message ...

Hi I am making a roster with the use of lookup (see below) - names say
"andrew" and "am".
I want only one name in either a1:a10 or a15:a20 either "andrew" or
"am", but not both - is it a validation or vba or help

andrew m


=IF(ISNUMBER(MATCH("andrew",K15:K16,0)),VLOOKUP(MA TCH("andrew",K15:K16,0),J2
5:K29,2),IF(ISNUMBER(MATCH("am",K19:K21,0)),VLOOKU P(MATCH("am",K19:K21,0),J2
5:L29,3),""))


--
andrewm
------------------------------------------------------------------------
andrewm's Profile:

http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380377


  #4   Report Post  
andrewm
 
Posts: n/a
Default


Hi,

yes thats right "andrew" or "am" but only one shall be in the range
however, when I use the range idea it works with if(sum etc.
but I must be doing a validation wrong as it doesn't work

I use a dropdown list to put names in the range of cells. how can I
make sure I only put down "andrew" or "am", but not both in the range
with use of a dropdown list

thanks andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380377

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
Cell addressing using the content of another cell. De Jandon Excel Worksheet Functions 5 April 1st 05 10:59 PM
How do I prevent Excel from plotting a cell w/ a formula as a "ze. Hatchet_Jack Charts and Charting in Excel 1 February 9th 05 10:31 PM
How do I prevent Excel from plotting a cell w/ a formula as a "ze. Bearclaw Chris Charts and Charting in Excel 0 February 9th 05 04:59 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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