Formula to auto fill a name

Beh162

Board Regular
Joined
Jan 15, 2015
Messages
132
Is it possible to have a formula that will auto fill something to a name associated with it
example if I type “A” it would then change it to “Auxilary”
”Bo” would go to bogart

i realize I would need a reference table, but what kind of formula would I need to work with?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Is it possible to have a formula that will auto fill something to a name associated with it
example if I type “A” it would then change it to “Auxilary”
”Bo” would go to bogart

i realize I would need a reference table, but what kind of formula would I need to work with?

a workaround would be to list all the values right on top of the header (no space in between).. say in your example:

A1 = Auxiliary
A2 = Bogart
A3 = Something
A4 = Another Something
A5 = this is your header

now when you type a value in A6, it will try to auto-fill based on the matches above..
 
Upvote 0
And you can hide those rows so no one else can see them
 
Upvote 0
Here is a Vba solution:

If you will be entering all your values in column "A" for example use this:

Put a list of your shortened values like "Ja" for January into column "E" starting in row(1) and as far down as you like.

And in column "F" adjacent to "Ja" put the full value like "January"

Now any time you enter "Ja" in column "A" the value will be changed to "January"

You can modify this script to include columns A to C or what ever you want. And you can modify the columns with your shortened and full text values if you want.

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Application.EnableEvents = False
Dim c As Range
    For Each c In Range("E1:E" & Cells(Rows.Count, "E").End(xlUp).Row)
        If c.Value = Target.Value Then Target.Value = c.Offset(0, 1).Value
    Next
End If
Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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