Solved

Possible to have formula in the same cell that has data validation?

Posted on 2013-01-16
2
270 Views
Last Modified: 2013-01-16
Hello - I've got this data input spreadsheet; one cell has a data validation list that could have either 1 row, or several rows; if there is only one row in the range feeding the DVL, I would like to automatically populate this cell with that value. Otherwise, the user has to pick from the list.

There is a 2nd issue; I don't want anything in that cell AT ALL, until the user enters a value in another cell.

So given:
the initial input cell is A1
the 2nd cell with the DVL is B1
the values for the data data validation list are on another worksheet in that workbook called "INPUTS", in column A, with a header of "Project Numbers", followed by 5-digit project numbers below that
 
I tried this formula in a test cell:
=IF(ISBLANK(A1), "",IF(COUNTIF(INPUTS!A:A, ">1") = 1, INPUTS!A2:A2), "")

So, if the user has not entered anything in A1, the B1 would be blank
If the user has entered something in A1, and there is only one project number in the range of INPUTS!A:A, then it would pull that value
Otherwise it would leave B1 blank, and the user would have to pick a value from the list

This works fine off in a "test cell", but it won't let me put that formula in B1, which has the data validation specified

Is that the way it is, or is there a way to get around this?

Thanks
0
Comment
Question by:mlagrange
2 Comments
 
LVL 13

Accepted Solution

by:
Shanan212 earned 500 total points
Comment Utility
So, if the user has not entered anything in A1, the B1 would be blank

This part can be only done through formulas/VBA. Since you cannot have a formula inside B1 due to it being an 'editable' cell, it has to be done via VBA.

Possibly through 'worksheet change' function.
0
 

Author Comment

by:mlagrange
Comment Utility
Yep, that's what it came to...

Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now