Solved

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

Posted on 2013-01-16
2
283 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
ID: 38783942
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
ID: 38784480
Yep, that's what it came to...

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
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 simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

910 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

24 Experts available now in Live!

Get 1:1 Help Now