Look Up Table Request for Help

RailEngineer76

New Member
Joined
Feb 3, 2023
Messages
9
Office Version
  1. 2010
Platform
  1. Windows
Hi,
I have a set of data I want to compare to a table of set criteria but cant fathom out how to get a cell to bring back the right answer.
Basically, we have criteria for "track categories" on types of rail and sleepers allowed, I then need to see if the types recorded meet the criteria set out.

Let me describe that better (refer to attached mini-sheet):

The criteria is set out in Col Q to S (Row 5 to 21) for Track Category, Rail, and Sleepers.
The data to check against these are for the set Track Category (Col J) with rail and sleeper types for each track [tracks are identified as "1100" and "2100", they are different tracks/roads]. So, for the "1100" the track category in Col J has rail type in Col F and sleeper type in Col H; for the "2100" has track category in Col J as well, but rail type in Col G and sleeper type in Col I. All to be reviewed against the criteria in Col Q to S.
If the rail type and sleeper type match the criteria for the proposed track category then its compliant (a yes or tick) if not then its non-compliant (a not or cross).

Any ideas how to do this?

added mini-sheet and a image of the sheet to help.


Cheers,
Dave

Standard Compliance.xlsx
ABCDEFGHIJKLMNOPQRST
1
2ELRSTART MILEAGEEND MILEAGERAIL TYPESLEEPER TYPEProposed Track CategoryCompliant RailCompliant SleeperCompliant to Table 18
3MilesYardsMilesYards110021001100210011002100Table 18 Variants
4MVL380811022C2C22Track CatRail TypeSleeper Type
5MVL38110822011C2C221A3C2
6MVL38220833022TC2213C2
7MVL38330844012TC2223C2
8MVL38440855012TC1222C1
9MVL38550866022TC1233C2
10MVL38660877022TC1232C1
11MVL38770888022TC1232S
12MVL38880899022TC1243C2
13MVL389908110022TC1142C1
14MVL3811008121022C1T142S
15MVL3812108132022C1T153C2
16MVL3813208143022C1C1152C1
17MVL3814308154022C1C1152S
18MVL3815408165022C1C1163C2
19MVL3816509022C1C1162C1
20MVL390911022C1C1162T
21MVL39110922022C1C1162S
22MVL39220933022C1C11
23MVL39330944022C1C11
24MVL39440955022C1C11
25MVL39550966022C1C11
26MVL39660977022C1T1
27MVL39770988021TT1
Standard Construction
Cell Formulas
RangeFormula
A4A4='C:\Users\Wools\AppData\Local\Temp\Temp1_Excel.zip\[MVL3 TARQUIN P03.xlsx]Version'!C4
F4:G27F4='C:\Users\Wools\AppData\Local\Temp\Temp1_Excel.zip\[MVL3 TARQUIN P03.xlsx]Asset Data'!X6
H4:I27H4='C:\Users\Wools\AppData\Local\Temp\Temp1_Excel.zip\[MVL3 TARQUIN P03.xlsx]Asset Data'!AD6
A5:A27A5=A4
B5:C27B5=D4
D5:D27D5=IF(E5="0",D4+1,D4)
E5:E27E5=IF(E4=1650,"0",E4+110)
 

Attachments

  • Capture.JPG
    Capture.JPG
    176.2 KB · Views: 4

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this

Cell Formulas
RangeFormula
M3:M26M3=IFERROR(IF(INDEX($Q$5:$Q$21,MATCH(G3&I3,$R$5:$R$21&$S$5:$S$21,0))=INDEX($Q$5:$Q$21,MATCH(G3&I3,$R$5:$R$21&$S$5:$S$21,0)),"Compliant"),"Non Compliant")
 
Upvote 0
Hi Skybluekid,

Almost - its not taking the Col J into consideration.

It needs to see whats allowed for Col J (Track Cat) in the Table (Col Q-R-S, against Col Q) to see if the values in Col F and H (for Col M) and G and I (for Col N) are related to that value in the table Col Q-R-S.

Sorry, hope that makes sense?


Dave
 
Upvote 0
So to make sure I am on the right lines(Sorry about the pun!) IF Col F & Col H & Col J = Col G & Col I & Col J, then it is compliant, if not it is not compliant?
 
Upvote 0
Try this:
Cell Formulas
RangeFormula
K3:K26K3=IF(M3=J3,"Compliant","Non Compliant")
L3:L26L3=IF(N3=J3,"Compliant","Non Compliant")
M3:N26M3=IFERROR(INDEX($Q$5:$Q$21,MATCH(F3&H3,$R$5:$R$21&$S$5:$S$21,0)),"")
 
Upvote 0
So to make sure I am on the right lines(Sorry about the pun!) IF Col F & Col H & Col J = Col G & Col I & Col J, then it is compliant, if not it is not compliant?
Hi, sorry wasn't online over weekend.
No, that's not right.

If Col F & Col H & Col J are found together in Table Q-R-S then its compliant.

Its hard to get the description clear. Basically, for a given Track Cat (Col Q) in Table Q-R-S we are allowed certain types of rail and sleeper (Col R and Col S).

The existing rails and sleepers (Col F and Col H) need to be OK for the Track Cat in Col J against that Table Q-R-S.

Sorry, I may be going in circles trying to describe this now...
 
Upvote 0
In cell M4 try either of these:
Excel Formula:
=IF(
      COUNTIFS($Q$5:$Q$21,J4,
                          $R$5:$R$21,F4,
                          $S$5:$S$21,H4)
       =0,
      "No-Compliant",
      "Compliant")

Excel Formula:
=IF(
     ISERROR(
           LOOKUP(2, 1/ (($Q$5:$Q$21=J4) * ($R$5:$R$21=F4) *( $S$5:$S$21=H4)), $Q$5:$Q$21)),
     "Non-Compliant",
     "Compliant")
 
Upvote 1
Solution
That 2nd formula seems to work a treat.

Thank you for all your help, very much appreciated.
 
Upvote 0
That 2nd formula seems to work a treat.

Thank you for all your help, very much appreciated.

The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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