I'm working with two separate tables.
1. Table A lives on a tab called 'Proposed Pieces'. It contains lots of data including a column called "DURATION" containing a cell with a value in it. In this table there is also a column called "G" with grades from 0 to 8.
2. Table B lives on a tab called 'Grade Durations'. This table describes the minimum and maximum duration corresponding to a specific grade using the columns "GRADE", "MINIMUM DURATION" and "MAXIMUM DURATION".
My VLOOKUP formula:
=OR(O2<VLOOKUP(C2, 'Grade Durations'!$A$1:$C$10, 2, TRUE), C2>VLOOKUP(O2, 'Grade Durations'!$A$1:$C$10, 3, TRUE))
I want the VLOOK formula to:
(i) check the column "Duration" in Table A, as well as the corresponding "G" column (in table A)
(ii) check the relevant row in Table B by matching the "G" value from table A with the GRADE value in Table B. Then it will sees what the relevant "Minimum Duration" and "Maximum Duration" is.
(iii) highlight the cell in column "DURATION" in Table A if the value within the cell doesn't fall within the "MINIMUM DURATION" and "MAXIMUM DURATION" values specific to the GRADE values in Table B.
Instead all of the cells are highlighted, regardless of whether they are less than or more than the related range - in this picture I've shown (with the red dot) which ones should not be highlighted:
1. Table A lives on a tab called 'Proposed Pieces'. It contains lots of data including a column called "DURATION" containing a cell with a value in it. In this table there is also a column called "G" with grades from 0 to 8.
2. Table B lives on a tab called 'Grade Durations'. This table describes the minimum and maximum duration corresponding to a specific grade using the columns "GRADE", "MINIMUM DURATION" and "MAXIMUM DURATION".
My VLOOKUP formula:
=OR(O2<VLOOKUP(C2, 'Grade Durations'!$A$1:$C$10, 2, TRUE), C2>VLOOKUP(O2, 'Grade Durations'!$A$1:$C$10, 3, TRUE))
I want the VLOOK formula to:
(i) check the column "Duration" in Table A, as well as the corresponding "G" column (in table A)
(ii) check the relevant row in Table B by matching the "G" value from table A with the GRADE value in Table B. Then it will sees what the relevant "Minimum Duration" and "Maximum Duration" is.
(iii) highlight the cell in column "DURATION" in Table A if the value within the cell doesn't fall within the "MINIMUM DURATION" and "MAXIMUM DURATION" values specific to the GRADE values in Table B.
Instead all of the cells are highlighted, regardless of whether they are less than or more than the related range - in this picture I've shown (with the red dot) which ones should not be highlighted: