I have a spreadsheet that reviews payment file names and values that needs formatting to highlight specific lines where the file exceeds a set value based of the file name & its storage location, as there can be some cross over amongst the names and drop locations.
Table 1
File Name | Value | File Storage |
---|---|---|
TEST_111111_235157 | 25000.00 | folderTest |
TEST_222222_123654 | 30000.00 | folderComplete |
Table 2
Profile Name | User Number | Highest Value | Match Criteria |
---|---|---|---|
IND – Test – Claims | 111111 | 20000.00 | folderTest |
IND – Test – Refunds | 222222 | 25000.00 | folderComplete |
The file name will change daily for every payment sent but they will have core components in each of them that is included in a list alongside its maximum payment value.
I need the conditional formatting to compare the value of the value in Table 1 against Table 2 and highlight if it exceeds that listed highest value, but only if the file name string contains the matching user number and the File Storage in Table 1 matches the Match Criteria in Table 2.
I have tried using an index match to complete this with the below formula but it highlights everything that exceeds the value in the first line of Table 2 instead of making sure they have a matching value for there specific file name.
=$B2>=INDEX('Table 2'!$C:$C,MATCH($C2,'Table 2'!$D:$D,1),MATCH(1,INDEX(COUNTIF($A:$A,"*"&'Table 2'!$D$1&"*"),),0))
This formula is then repeated for B3, B4, B5 etc. depending on how many payments are processed that day to try and cover all eventualities. The date in Table 2 currently has 17 different criteria but this will increase as new payment types are added for new systems.
SpamDandy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
Not very neat, but works: Values are numbers if they are text then convert them with the VALUE function.
=IF(B2>IF(SUM(IF((IFERROR(SEARCH(rang1,A2),0)>0)*(C2=D$11:D$12),C$11:C$12,0))=0,1E+99,SUM(IF((IFERROR(SEARCH(rang1,A2),0)>0)*(C2=D$11:D$12),C$11:C$12,0))),TRUE,FALSE)
In conditional format, table names cannot be used, has to be replaced with actual ranges or use name manager.
In the example rang1 is defined as Table1[User Number] seen on the screenshot. This can be done with Highest Value
and Match Criteria
also.