Variable results from a cell input

Blakes7

New Member
Joined
Jun 12, 2019
Messages
13
Hi,

Not sure how to do this but I want to have a cell display various message text depending the value input into another cell

e.g. if value in cell D10 = 1 then in cell D8 I want to see the message Change
if value in cell D10 = 2 then in cell D8 I want to see the message Pump Out

I may want to expand this for several more different messages. Can this be done?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You can do this with a VLOOKUP. In another area of your workshhet, type the value in one column (I have assumed G) and the result you want in the column to the right (H). Then use this formula in D8: =VLOOKUP(D10,G:H,2,false)
You can then just add further entries in columns G and H as needed.

Excel 2007 32 bit
DEFGHI
11Text for value 1
22Text for value 2
33etc.
4
5
6
7
81
9
10Text for value 1

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
D10=VLOOKUP(D8,G:H,2,FALSE)

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
You could also use:
=CHOOSE(D10,"Change","Pump Out")
Just add more options into the formula as required.
 
Upvote 0
Hi,

Works great on a blank sheet but having problem on the actual sheet, I may be getting confused on the actual sheet I want the text to be displayed in cell G8 based on the value I input into cell J8 I also want to copy the formula to other cells in the same columns and display text from a set of text which will be fixed into cells in column L so the formula will have to take into account the values in he cells in column being absolute values for all the cells the formulae are inserted.
 
Upvote 0
I don't completely understand what you're looking for.
Maybe if you posted an example here. I know you can't attach a file but give some specific examples of your text, where it is positioned and what the expected result is.
It may be as simple as changing =CHOOSE(D10,"Change","Pump Out") to =CHOOSE(D10,L1,L2,L3) but I can't be sure without examples.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top