Solved

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

Posted on 2013-01-16
2
291 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

785 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