Solved

Excel validation source

Posted on 2007-03-21
4
148 Views
Last Modified: 2010-04-30
I am using data validation and I need to set it up so that if a cell is added to the source, it will automatically add it to my list box. For example, right now the source for the validation is:
=$BA$1:$BA$28
How do I set it up so that if I input into Range("BA29 "), it will automatically update it?


0
Comment
Question by:tiehaze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:WJReid
ID: 18764432
Hi,

If you make it a dynamic range,

Insert|Name|Define, then type in the Name of the Range you want (RangeName) for example and in the formula box type

=offset(BA1,0,0,counta(BA1:BA200))
This will allow up to 200 entries.

then do the validation and set it up to =RangeName
0
 
LVL 13

Accepted Solution

by:
WJReid earned 500 total points
ID: 18764468
Hi,

In the Data|Validation, first select List, then in the Source box type =RangeName or whatever you call the range you have used for the validation.
You could also use $ to make it absolute values, e.g.

=offset($BA$1,0,0,counta($BA$1:$BA$200))
then you can copy the validation to other cells. If you need more than 200 entries, just change the 200 in the formula to whatever you like.

Bill
0
 
LVL 45

Expert Comment

by:patrickab
ID: 18764475
You could set it up with this in the 'source box in Data Validation:

=BA:BA

That would include anything you have in column BA.

If you want to include only those cells containing something put this in the source box:

=OFFSET($D$1,0,0,COUNTA($D:$D),1)
0
 
LVL 45

Expert Comment

by:patrickab
ID: 18764492
Bill - That's a cross over... although I got the column wrong in the dynamic range - Patrick
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question