Is there a way to ask excel to give the first or second or... value from the list?

Meko1

New Member
Joined
Oct 20, 2020
Messages
44
Office Version
  1. 2016
Platform
  1. Windows
Hello
I am interested if there is a way excel to give me the 1st value or the text which is in the list or a column.
As in this example First to be blue. 2nd red 5th yellow and so on.

Thank you in advance


sample problem.xlsx
ABCDEF
1
2give me 1st value from the color List, or A columngive me 2ndgive me 5th
3blue
4red
5green
6black
7orange
8brown
9yellow
10
11
Sheet1
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Book1
ABCDEF
2125
31blueblueredorange
42red
53green
64black
75orange
86brown
97yellow
Sheet1
Cell Formulas
RangeFormula
D3:F3D3=VLOOKUP(D2,$A$3:$B$9,2,FALSE)
 
Upvote 0
Solution
If you do not want to insert a column containing the position of each colour in the list then you can use the OFFSET function.

=OFFSET($A$1,1,0,1,1) where the second argument is the index number of the colour you want.
 

Attachments

  • Image.JPG
    Image.JPG
    58.6 KB · Views: 4
Upvote 0

Forum statistics

Threads
1,215,322
Messages
6,124,241
Members
449,149
Latest member
mwdbActuary

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