Spreadsheet: 91868d1291569119-conditionalformatting_basedonpreviouscell_and_withinthejournalentrynumber-parent-cell-modified_journalentry
Sheet: Sheet1

 | here all the user ids should be in black |  | JE1170 | user5 |  | JE1170 | user15 |  | JE1170 | user5(parent) | here in this 3rd scenario within
 | as within the same journal entry they are different user ids(mulitiple users) |  | JE1170 | user5 |  | JE1170 | user5 |  | JE1170 | user5(white) | the same journal entry they are same
 |  |  | JE1170 | user10 |  | JE1170 | user10 |  | JE1170 | user5(white) | user ids so all the user ids shuld be in white except
 |  |  |  |  | here too in this 2nd scenario within the same journal entry they |  |  |  |  |  | the parent user id
 |  |  |  |  | are different user ids so all the user ids should be in  black color
 |  | hence I conclude that if atleast one userid is different within the same journal entry then all the user ids should be in black
 |  | oderwise only the parent user id shuld be in black and the childs user id within the same journal entry should be in white.
 |  | please apply the formula here for this particular range to demonstrate the solution
 |  | Grouping Level | Type of Entry | No. of Lines | Journal Entry Number | Account Number / Journal Entry Description | Journal Line Description | Account Name |  |  | Debit | Credit | User ID
 |  | Entry | NST | 2 | JE1146 | THE WORST JE EVER!! I BET THERE IS FRAUD IN HERE!! |  |  |  |  | 1000000 | 1000000 | User 5
 |  | Line | NST | 1 | JE1146 | A0801 |  | Unexpected Income |  |  | 0 | 1000000 | User 5
 |  | Entry | NST | 2 | JE1171 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 400000 | 400000 | User 13
 |  | Line | NST | 1 | JE1171 | A0998 |  | Test Expense 1 |  |  | 400000 | 0 | User 5
 |  | Line | NST | 1 | JE1171 | A0999 |  | MISC Expense |  |  | 0 | 400000 | User 13
 |  | Entry | NST | 2 | JE1172 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 333187 | 333187 | User 15
 |  | Line | NST | 1 | JE1172 | A0998 |  | Test Expense 1 |  |  | 333187 | 0 | User 5
 |  | Line | NST | 1 | JE1172 | A0999 |  | MISC Expense |  |  | 0 | 333187 | User 5
 |  | Entry | NST | 2 | JE1169 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 150 | 150 | User11
 |  | Line | NST | 1 | JE1169 | A0998 |  | Test Expense 1 |  |  | 150 | 0 | User11
 |  | Line | NST | 1 | JE1169 | A0999 |  | MISC Expense |  |  | 0 | 150 | User11
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 5
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 51
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 5
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 5
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 7
 |  | Entry | NST | 2 | JE1170 | 02. ENTRIES MADE TO UNUSUAL ACCOUNTS |  |  |  |  | 275 | 275 | User 5
 |  | Please help me with this using Conditional Formatting and no macros.
 |  |  |  |  | output should be like |  |  |  |  |  |  |  | output should be like
 |  |  |  |  | Journal Entry Number |  |  |  |  |  |  |  | User ID
 |  |  |  |  | JE1146 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1146 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1171 |  |  |  |  |  |  |  | User 13
 |  |  |  |  | JE1171 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1171 |  |  |  |  |  |  |  | User 13
 |  |  |  |  | JE1172 |  |  |  |  |  |  |  | User 15
 |  |  |  |  | JE1172 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1172 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1169 |  |  |  |  |  |  |  | User11
 |  |  |  |  | JE1169 |  |  |  |  |  |  |  | User11
 |  |  |  |  | JE1169 |  |  |  |  |  |  |  | User11
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 51
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 5
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 7
 |  |  |  |  | JE1170 |  |  |  |  |  |  |  | User 5