?
Solved

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

Posted on 2013-01-16
2
Medium Priority
?
317 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
[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 Comments
 
LVL 13

Accepted Solution

by:
Shanan212 earned 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

770 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