Search Table

ronie85

Board Regular
Joined
Jan 25, 2014
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Hi, I am looking a formula to search a table say D and 5 to return "Red" if someone could help please.


1711292770573.png
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
how about
Excel Formula:
=index(b2:g8,xmatch(5,a2:a8),xmatch("D",b1:g1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
I hope you can help further, I've now used the formula in another way and need to incorporate the 3rd scenario. D, 5, Apr to show "Red".

This has worked in my new row but when filled, it shows Ref therefore something isn't working correct. Maybe it is the order in which I have wrote it.

This is the formula I am using however the table further below is to simplify it so that I can understand it simply and apply it.

=INDEX('Approved Payroll'!$B$3:$AG$6,XMATCH(C2,'Approved Payroll'!$A$3:$A$6),XMATCH(B2,'Approved Payroll'!$B$1:$K$1),XMATCH($E$1,'Approved Payroll'!$B$2:$K$2))

ABCDEF
JanFebMarAprMayJun
1GreyPurpleBlackOrangeBlueGreen
2RedGreyPurpleBlackOrangeBlue
3GreenRedGreyPurpleBlackOrange
4BlueGreenRedGreyPurpleBlack
5OrangeBlueGreenRedGreyPurple
6BlackOrangeBlueGreenRedGrey
7PurpleBlackOrangeBlueGreenRed

1711305115143.png
 
Upvote 0
As D & Apr are on the same column you can just match one of them.
 
Upvote 0
Would there be any way to match 3 if i changed the layout? It did work for one however that may have been luck
 
Upvote 0
How about
Excel Formula:
=INDEX('Approved Payroll'!$B$3:$AG$6,XMATCH(C2,'Approved Payroll'!$A$3:$A$6),XMATCH(B2&"|"&E1,'Approved Payroll'!$B$1:$K$1&"|"&'Approved Payroll'!$B$2:$K$2))
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,094
Members
453,021
Latest member
Justyna P

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