if cells A2:A200 contains "WX", display "AB". if cell A2:A200 contains "YZ", display "CD".....

arl0

New Member
Joined
Apr 25, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Trying to create an intuitive excel spreadsheet. Essentially, I've a list of abbreviations, and want to have a separate list display text based on said abbreviation

E.g:
1650896594234.png


If Abbreviation = Q1, display "Quarry 1" in Location.
If Abbreviation = A1, display "Axel 2" in Location

and so on and so forth...

I'm unsure of which the best function would be to incorporate this. My list of abbreviations total ~10, with ~10 total location outputs.
I'm aware I could just add a drop down to each "Location" cell but wanted to try to make it automated

Any help is greatly appreciated
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi & welcome to MrExcel.
You could set-up a lookup table with the abbreviations in one column & the location in the next column & then use Vlookup.
 
Upvote 0
Confirmed lookup and vlookup works very well with that example, thank you.

To complicate things a little, I have a list of 'Names' with the abbreviations in them:

1650899666659.png


I'd need to output 'Quarry 1' next to the cell with 'West-Q1', 'Axel 2' next to the cell with 'South-A2'. Identify the abbreviation in the 'Name' cell's text and output text in the 'Location' based on that, if that makes sense

Would I need to use something different that vlookup, or simply add something to it?

Thank you kindly
 

Attachments

  • 1650899547773.png
    1650899547773.png
    10 KB · Views: 1
Upvote 0
If your abbreviations are always 2 characters you can use
Excel Formula:
Right([@Name],2)
in the vlookup.
 
Upvote 0

Forum statistics

Threads
1,213,533
Messages
6,114,179
Members
448,554
Latest member
Gleisner2

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