Excel: Formulas and dropdown lists - excel

I am trying to make a cell display the result of a VLOOKUP but allow the user to change the cells value to something from a dropdown list if they choose to.
I don't want the formula to be visible to the user.
The problem I'm having is when the user picks a different value from the list the formula is erased. When the criteria for the formula changes I want it to update to the new result.
I'm using Excel 2010. Any help is appreciated!

We can use an extra cell or two. In A3 we put a number and in A2 we can enter from a drop-down list. In A1 we have:
=IF(A2<>"",A2,VLOOKUP(A3,C1:D13,2,FALSE))
So if A2 is blank, we use the VLOOKUP(). If A2 has a value, we use that value.

Related

How to Apply Conditional Format to show a field is mandatory to be filled in based on a vlookup to another sheet

I'm trying to create a form in excel for my team to fill out which highlights certain cells in a row as compulsory (format the cell colour) based on the number from a table in another sheet which has 3 preset dimensions ("M"=Mandatory, "P"=Prohibited, "O"=Optional) for each number across multiple analysis field.
I have tried conditional formatting formulas to highlight the cell to fill out if the lookup of the number chosen returns "M") but I don't seem to have a formula which validated this and returns with the cell highlighted when it needs to completed.
I would like the formula to return the cell as highlighted if it is mandatory based on the lookup to the table and need the user to fill out the cell with the information relevant.
Any help would be much appreciated.
If I understand your question correctly you just want the cell to highlight when its sister cell in another sheet is coded "M". That's a fairly easy formula.
=Sheet2!$B1="M"
This is for a straight column in B, where the cell it's checking against is in sheet 2 and also in column B. If it's for a row simply move the $ to say b$1.
If you want the highlight to disappear when the cell is filled in use this formula:
=AND($B1=0,Sheet2!$B1="M")

Excel - how to return a text in a cell when something is tyed in a different cell

Good day
I am trying to create a worksheet where if something is typed in to a cell then a word should appear in another cell.
Let's say for example if, in cell A1 the word "Generic" is typed, then I want the number 1 to appear in cell B2, and if the word "QSE" is typed in cell A1 then I want the number 2 to appear in cell B2.
Any suggestions?
Much appreciated
Use an IF formula in cell B2:
=IF(A1="","",IF(A1="generic",1,IF(A1="QSE",2)))
The easiest way is to create a small table of inputs and outputs.
Then use VLOOKUP to reference that table and return the correct value:
=VLOOKUP(A1,F:G,2,FALSE)
If you do not want the grid but want to "hard code" in the formula:
=INDEX({1,2},MATCH(A1,{"Generic","QSE"},0))
One more option if you have a subscription to Office 365 Excel:
=IFS(A1="Generic",1,A1="QSE",2)

Excel - Tie two list together

I have two list in excel that need to be tied together so that when an item in the first is selected from a drop down (C2) it changes the cell next to it (D2) to the corresponding value.
You can use Vlookup for that. In cell D2 enter this formula:
=vlookup(C2,List!$A$1:$B:$31,2,false)

Row Number In Formula Not Counting When I Drag

I have the formula below that I'm using to link to a certain sheet and cell in my workbook that contains a graph for each entry. On the sheet I link too, each graph is about 20 cells down from the previous one. I have over a 100 graphs now and it will grow in time so I was trying to use the HYPERLINK formula rather than the Hyperlink button for this. I thought I would be able to just insert the formula in the first row, paste it in the second row with an added 20 cells, highlight the two and drag it down but it will not count in increments of 20.
Is this even possible?
=HYPERLINK("#'Trends'!A25","Click To View Trend")
I'm thinking you will have to use some type of concatenation to get the behavior you are after. To do this, you may want to employ a "helper" column. For example, put the "numbers" you are after in column B -- below you will see that I incremented it by 5.
Now your HYPERLINK formula in cell A1 is written as:
=HYPERLINK("[Book1]Sheet2!A"& B1,"Click Me for Sheet2, Cell A"&B1)
(Assuming the workbook is called Book1. Now, I can drag that formula down and it will update "dynamically" to account for the changes in column B.

Drop down list selection Excel VBA

I want to populate a cell depending upon the drop down selection. How can i do it? The drop down list is created manually in the sheet.
EDIT: I have a column where every cell is a drop-drown. Depending upon what i select in the drop-down, the adjacent cell should get populated with a value.
Lets say you have a dropdown box in A1 allowing values 1,2, or 3, and you want B1 to show "A", "B", or "C" accordingly. Just type the formula
=IF(A1=1,"A",IF(A1=2,"B",IF(A1=3,"C","-")))
into B1. Of course, this works also when you have no dropdown box in A1.
Have a look on Vlookup and Index Match they are usually easier to create and mantain than nested If .
If you need examples let me know

Resources