Formula question for multiple outputs

kernownelly

New Member
Joined
Feb 11, 2024
Messages
1
Office Version
  1. 365
  2. 2011
Platform
  1. Windows
Hi everyone it has been a long time since creating a spreadsheet and well my for.ula knowledge has gone. I am looking for help for a formula to aid with some data input.
Is it possible to create a formula for the following:
If "a" is inputted then display "x" but this for a range of 6 possible inputs (ranging for example a - f) displaying one of a possible 6 words.
For example if I typed c I to a cell then friday would be displayed and if d was typed then sunday displayed.
Just to make data input easier than typing the words in using a lettered system

Hope makes sense.

Thanks in advance
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
something like this maybe
Book1
ABCDE
2asaasa
3bsu
4cmo
5dtu
Sheet1
Cell Formulas
RangeFormula
B2B2=FILTER(E2:E5,D2:D5=A2,)
 
Upvote 0
For older versions of Excel (like 2011):

Book1
ABCDE
1
2asaasa
3bsu
4cmo
5dtu
Sheet8
Cell Formulas
RangeFormula
B2B2=VLOOKUP(A2,$D$2:$E$5,2,0)


Also, depending on what you have in mind, you could add your words to AutoCorrect. Click on File>Options>Proofing>AutoCorrect Options, and add your before and after conversion words. I wouldn't recommend it for single letters though.
 
Upvote 0
If you wouldn't mid using VBA you could place the following code in the Workbook Section in the VBA Editor.
Press [Alt]+[F11] to bring up the VBA Editor.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   Application.EnableEvents = False
   'Code that modifies cells
   If Target.Count = 1 Then
      Select Case Target
         Case "a"
            Target = "Monday"
         Case "b"
            Target = "Tuesday"
         Case "c"
            Target = "Wednesday"
         Case "d"
            Target = "Thursday"
         Case "e"
            Target = "Friday"
         Case "f"
            Target = "Saturday"
         Case Else
            GoTo EndOfSub
      End Select
   End If
EndOfSub:
   Application.EnableEvents = True
End Sub


But as @Eric W mentioned it is not recommended with single letters.

Instead I would add a suffix like a period (e.g. "a." becomes "Monday" etc.)
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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