Spreadsheet: 746702d1630957491-help-on-sort-filter-formula-based-on-cash-or-bank-sortby-1
Sheet: Sheet1

Kindly asking for help on my formula: SORT, FILTER on cell Q4, to produce the desired outcome on X4. Please note that on X2 there is drop down list, so that when you select cash it produces report for only cash items.
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | BANK | drop down list
 |  |  | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |  | CURRENT FORMULA |  |  |  |  |  |  | Desired Outcome
Payment Method | Date | Name | Receipt | Revenue | Expenses | Revenue US$ | Expenses US$ | Financial Category | Status | Customer / Supplier | Terms | Column1 | OK | TM |  | Payment Method | Date | Name | Receipt | OK | TM |  | Date | Name | Receipt | OK | TM
Bank | 2021-03-23 00:00:00 | [NAME] | 14259 | 15000 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 15000 | 0 |  |  | 2021-03-23 00:00:00 | [NAME] | 14259 |  | 30000 |  | 2021-01-10 00:00:00 | [NAME] | 14268 | 6469.69 | 0
Bank | 2021-03-23 00:00:00 | [NAME] | 14260 | 5000 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 5000 | 0 |  | Bank | 2021-03-23 00:00:00 | [NAME] | 14260 | 0 | 29500 |  | 2021-01-11 00:00:00 | [NAME] | 14269 | 10000 | 0
Cash | 2021-03-23 00:00:00 | OK | 14261 | 23095.33 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 0 | 0 |  | Bank | 2021-03-26 00:00:00 | [NAME] | 14264 | 0 | 6000 |  | 2021-01-30 00:00:00 | [NAME] | 14265 | 5000 | 0
Cash | 2021-03-25 00:00:00 | Tomy | 14262 | 15000 |  | 0 | 0 | Fees | Received | Customer | 0 | 201 | 0 | 0 |  | Bank | 2021-03-29 00:00:00 | [NAME] | 14263 | 0 | 29500 |  | 2021-03-01 00:00:00 | Tomy | 14267 | 5000 | 0
Cash | 2021-03-26 00:00:00 | [NAME] | 11399 | 1930 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 0 | 0 |  | Bank | 2021-01-30 00:00:00 | [NAME] | 14265 | 5000 | 0 |  | 2021-03-19 00:00:00 | [NAME] | 14270 | 15000 | 0
Bank | 2021-03-26 00:00:00 | [NAME] | 14264 | 6469.69 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 6469.69 | 0 |  | Bank | 2021-03-30 00:00:00 | OK | 14266 | 5000 | 0 |  | 2021-03-23 00:00:00 | [NAME] | 14259 | 0 | 30000
Bank | 2021-03-29 00:00:00 | [NAME] | 14263 | 10000 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 10000 | 0 |  | Bank | 2021-03-01 00:00:00 | Tomy | 14267 | 5000 | 0 |  | 2021-03-23 00:00:00 | [NAME] | 14260 | 0 | 29500
Bank | 2021-01-30 00:00:00 | [NAME] | 14265 | 5000 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 5000 | 0 |  | Bank | 2021-01-10 00:00:00 | [NAME] | 14268 | 6469.69 | 0 |  | 2021-03-26 00:00:00 | [NAME] | 14264 | 0 | 6000
Bank | 2021-03-30 00:00:00 | OK | 14266 | 5000 |  | 0 | 0 | Fees | Received | Sundry | 0 | 201 | 5000 | 0 |  | Bank | 2021-01-11 00:00:00 | [NAME] | 14269 | 10000 | 0 |  | 2021-03-29 00:00:00 | [NAME] | 14263 | 0 | 29500
Bank | 2021-03-01 00:00:00 | Tomy | 14267 |  | 30000 | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 30000 |  | Bank | 2021-03-19 00:00:00 | [NAME] | 14270 | 15000 | 0 |  | 2021-03-30 00:00:00 | OK | 14266 | 5000 | 0
Bank | 2021-01-10 00:00:00 | [NAME] | 14268 |  | 29500 | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 29500
Bank | 2021-01-11 00:00:00 | [NAME] | 14269 |  | 6000 | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 6000 |  |  |  |  |  |  |  | BANK
Bank | 2021-03-19 00:00:00 | [NAME] | 14270 |  | 29500 | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 29500 |  |  |  |  |  |  |  | CASH
Cash | 2021-03-22 00:00:00 | OK | 14271 | 10000 |  | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 0
Cash | 2021-03-24 00:00:00 | Tomy | 14272 | 77500 |  | 0 | 0 |  | Swipe | Sundry | 0 |  | 0 | 0