Hi there, I have a sheet within a workbook (with other sheets) that has multiple columns and gets updated every month with new data for the month that just closed (appended at the end). For any accountants out there, its a general ledger of transactions for the month, for just one account. Some of the columns within the sheet are generated from the ERP system some by me if I need to analyze something. I uploaded a sample file with dummy data. I was hoping I would get some help with a simple macro that extracts certain columns out of this data based on Criteria that the user would need to enter. The criteria would be in Column Y, Z and AF, which are the month, year and unique identifier, which is a concatenate of two other cells. I would need the data extracted and put in another sheet, preferably in a completely new workbook, but if two complicated the same workbook is fine and the columns I would need to extract are Col F-Q only. So the user would get prompted to enter the month, year and unique identifier and the macro would extract the data matching those criteria in Col F-Q into another sheet for the user. Would this be possible? I was playing around with the index, aggregate and row functions, but it was getting complicated as I need to add another unique identifier to capture all the criteria I want to extract, so I was hoping one of you excel rockstars could help me out. I highlighted to col to be extracted in yellow and criteria columns in green. I appreciate all your help.
Test file.xlsx | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | |||
3 | GL Report | Entity | Account | Description | Sub Account | Description | JE Type | JE Type | Batch Number | Period Entered | Reference | Transaction Date | Description | Debit | Credit | Net | Other Data | Other Data | Other Data | Other Data | Other Data | Other Data | Other Data | Other Data | Month | Year | Other Data | Other Data | Other Data | Other Data | Other Data | Unique Identifier | ||
4 | 6/30/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7890 | 6/1/2021 | TAX | 6/4/2021 | meeting | 425.00 | 0 | 425 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
5 | 6/30/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7891 | 6/2/2021 | REIMB | 6/5/2021 | travel | 11 | 0 | 11 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
6 | 6/30/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7892 | 6/3/2021 | 123 | 6/6/2021 | taxi | 45 | 0 | 45 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
7 | 6/30/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7893 | 6/4/2021 | APR CC | 6/7/2021 | hotel | 6 | 0 | 6 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
8 | 6/30/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7894 | 6/5/2021 | 567 | 6/8/2021 | ABC | 73 | 0 | 73 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
9 | 6/30/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7895 | 6/6/2021 | TAX | 6/9/2021 | meeting | 5678 | 0 | 5678 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
10 | 6/30/2021 | B | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7896 | 6/7/2021 | PMT | 6/10/2021 | travel | 24467 | 0 | 24467 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - DEF | ||
11 | 6/30/2021 | B | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7897 | 6/8/2021 | PMT | 6/11/2021 | taxi | 12 | 0 | 12 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - DEF | ||
12 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7898 | 6/9/2021 | PMT | 6/12/2021 | hotel | 75 | 0 | 75 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
13 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7899 | 6/10/2021 | PMT | 6/13/2021 | ABC | 8 | 8 | 0 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
14 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7900 | 6/11/2021 | TAX | 6/14/2021 | meeting | 23 | 2342 | -2319 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
15 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7901 | 6/12/2021 | PRO FEE | 6/15/2021 | travel | 8 | 35 | -27 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
16 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7902 | 6/13/2021 | PRO FEE | 6/16/2021 | taxi | 4 | 6 | -2 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
17 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7903 | 6/14/2021 | PRO FEE | 6/17/2021 | hotel | 14 | 0 | 14 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
18 | 6/30/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7904 | 6/15/2021 | PRO FEE | 6/18/2021 | ABC | 65 | 0 | 65 | abc | abc | abc | abc | abc | abc | abc | abc | 6 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
19 | 7/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7905 | 7/1/2021 | PRO FEE | 7/8/2021 | meeting | 6 | 0 | 6 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
20 | 7/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7906 | 7/2/2021 | PRO FEE | 7/9/2021 | travel | 83 | 0 | 83 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
21 | 7/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7907 | 7/3/2021 | PRO FEE | 7/10/2021 | taxi | 53 | 0 | 53 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
22 | 7/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7908 | 7/4/2021 | MAR CC | 7/11/2021 | hotel | 7 | 136 | -129 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
23 | 7/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7909 | 7/5/2021 | MAR CC | 7/12/2021 | ABC | 23 | 0 | 23 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
24 | 7/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7910 | 7/6/2021 | MAR CC | 7/13/2021 | meeting | 53 | 83 | -30 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
25 | 7/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7911 | 7/7/2021 | MAR CC | 7/14/2021 | travel | 567 | 0 | 567 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
26 | 7/31/2021 | B | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7912 | 7/8/2021 | MAR CC | 7/15/2021 | taxi | 2 | 0 | 2 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - DEF | ||
27 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7913 | 7/9/2021 | MAR CC | 7/16/2021 | hotel | 53 | 0 | 53 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
28 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7914 | 7/10/2021 | MAR CC | 7/17/2021 | ABC | 76 | 0 | 76 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
29 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7915 | 7/11/2021 | MAR CC | 7/18/2021 | meeting | 78989 | 0 | 78989 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
30 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7916 | 7/12/2021 | 2/21/2021 | 7/19/2021 | travel | 234 | 0 | 234 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
31 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7917 | 7/13/2021 | 2/21/2021 | 7/20/2021 | taxi | 345 | 0 | 345 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
32 | 7/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7918 | 7/14/2021 | 2/21/2021 | 7/21/2021 | hotel | 5435 | 0 | 5435 | abc | abc | abc | abc | abc | abc | abc | abc | 7 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
33 | 8/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7919 | 8/1/2021 | 6/21/2021 | 8/10/2021 | ABC | 1246.00 | 0 | 1246 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
34 | 8/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7920 | 8/1/2021 | 6/21/2021 | 8/11/2021 | meeting | 23 | 0 | 23 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
35 | 8/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7921 | 8/1/2021 | 6/21/2021 | 8/12/2021 | travel | 53 | 0 | 53 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
36 | 8/31/2021 | A | 1234 | Due from Company | ABC | Company B | GJ | GL | 7922 | 8/1/2021 | REIMB | 8/13/2021 | taxi | 46 | 0 | 46 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - ABC | ||
37 | 8/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7923 | 8/1/2021 | 6/21/2021 | 8/14/2021 | hotel | 57 | 0 | 57 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
38 | 8/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7924 | 8/1/2021 | 6/21/2021 | 8/15/2021 | ABC | 23 | 0 | 23 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
39 | 8/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7925 | 8/1/2021 | 6/21/2021 | 8/16/2021 | meeting | 32 | 0 | 32 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
40 | 8/31/2021 | A | 1234 | Due from Company | DEF | Conpany D | GJ | GL | 7926 | 8/1/2021 | PRO FEE | 8/17/2021 | travel | 5 | 0 | 5 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - DEF | ||
41 | 8/31/2021 | A | 1234 | Due from Company | GHI | Company E | GJ | GL | 7927 | 8/1/2021 | PMT | 8/18/2021 | taxi | 2 | 0 | 2 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - GHI | ||
42 | 8/31/2021 | A | 1234 | Due from Company | GHI | Company E | GJ | GL | 7928 | 8/1/2021 | PMT | 8/19/2021 | hotel | 42 | 0 | 42 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | A - GHI | ||
43 | 8/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7929 | 8/1/2021 | PMT | 8/20/2021 | ABC | 53 | 0 | 53 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
44 | 8/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7930 | 8/1/2021 | PMT | 8/21/2021 | meeting | 24 | 0 | 24 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - GHI | ||
45 | 8/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7931 | 8/1/2021 | 8/22/2021 | travel | 31 | 0 | 31 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - GHI | |||
46 | 8/31/2021 | B | 1234 | Due from Company | GHI | Company E | GJ | GL | 7932 | 8/1/2021 | 8/23/2021 | taxi | 32 | 0 | 32 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - GHI | |||
47 | 8/31/2021 | B | 1234 | Due from Company | KLM | Company F | GJ | GL | 7933 | 8/1/2021 | 7/8/2020 | 8/24/2021 | hotel | 35 | 0 | 35 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - KLM | ||
48 | 8/31/2021 | B | 1234 | Due from Company | ABC | Company F | GJ | GL | 7934 | 8/1/2021 | REIMB | 8/25/2021 | ABC | 133 | 0 | 133 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - ABC | ||
49 | 8/31/2021 | B | 1234 | Due from Company | ABC | Company F | GJ | GL | 7935 | 8/1/2021 | REVERSAL | 8/26/2021 | meeting | 42 | 0 | 42 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - ABC | ||
50 | 8/31/2021 | B | 1234 | Due from Company | ABC | Company F | GJ | GL | 7936 | 8/1/2021 | PMT | 8/27/2021 | travel | 43 | 0 | 43 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - ABC | ||
51 | 8/31/2021 | B | 1234 | Due from Company | ABC | Company F | GJ | GL | 7937 | 8/1/2021 | 5/1/2021 | 8/28/2021 | taxi | 323412 | 0 | 323412 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - ABC | ||
52 | 8/31/2021 | B | 1234 | Due from Company | ABC | Company F | GJ | GL | 7938 | 8/1/2021 | 78901 | 8/29/2021 | hotel | 3 | 0 | 3 | abc | abc | abc | abc | abc | abc | abc | abc | 8 | 2021 | abc | abc | abc | abc | abc | B - ABC | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
Z4:Z52 | Z4 | =MONTH(M4) |
AA4:AA52 | AA4 | =YEAR(K4) |
K5:K18,M34:M52,J5:J52,M20:M32,K20:K32,M5:M18 | K5 | =K4+1 |
Q4:Q52 | Q4 | =O4-P4 |
AG4:AG52 | AG4 | =CONCATENATE(C4," - ",F4) |