Search Table

ronie85

Board Regular
Joined
Jan 25, 2014
Messages
96
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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,223,882
Messages
6,175,165
Members
452,615
Latest member
bogeys2birdies

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