# Fill one cell depending on value of another

I'm trying to create a Risk Assessment sheet in Excel.

I have one drop-down with days at the moment and I want another cell to be populated depending on what day is selected.

I have managed to get this working for one day but not all days.

`=IF(F16="Monday","Apple","")`

How can I expand this formula to show the following:

F16 = Monday, G16 = Apple
F16 = Tuesday, G16 = Orange
F16 = Wednesday, G16 = Banana
F16 = Thursday, G16 = Pear

Basically what you are looking for is called a `LOOKUP` function in excel.

Step-1: Make a list of X and Y (in your case DAYS and FRUITS) - let us say this range is A1 to B7

Step-2: Write the following formula in the cell where you want the fruit name to appear `=VLOOKUP(A8,A1:B7,2,0)` (assuming that A8 contains your DAY)

• This works ok, can it be made to copy the text so it can be edited because at the min if I go to copy the text it just shows the formula? – Ryanagray Aug 25 '15 at 13:20
• copy the cell with formula and do "Paste-Special" - Now you can edit the text – Prasanna Aug 25 '15 at 13:23
• Can this be don't programically so it copies the text and not the formula – Ryanagray Aug 25 '15 at 13:27
• that will involve the use of VBA (read as coding). Would you be interested in going down this lane. I'm assuming your RA is the priority. – Prasanna Aug 25 '15 at 13:30
• I would be interested in VBA altho I have never done this so could take some explaining. – Ryanagray Aug 25 '15 at 14:15

``````=IF(F16="Monday","Apple",IF(F16="Tuesday","Orange",IF(F16="Wednesday","Banana",IF(F16="Thursday","Pare",""))))
`=IFS(F16=Monday,Apple,F16=Tuesday,Orange,F16=Wednesday,Banana,F16=Thursday,Pear)`