Take Excel Worksheet, Divide into Worksheets/Workbooks by Employee/Card #, Email via Gmail to Employee for Input

jennifer7i884

New Member
Joined
Aug 1, 2023
Messages
8
Office Version
  1. 2010
Platform
  1. Windows
Apologies if this is completely basic, but I can't find anything in the forums that directly relates to what I'm trying to accomplish. I am not at all schooled in anything VBA, technical Excel, etc. I just Google to figure things out, and here I am!

Here's my starting point:
  1. I have a workbook with a data dump ("Chase Data") from our credit card company, listing last 3 or 4 digits of the card #, transaction date, posting date, transaction description, category, type, and amount, plus a column for the employee to add their Notes.
  2. I've used vlookups (based on another tab) to pull in the full 4-digit card #, card status, employee name, and employee work email address.

I'd like to:
  1. Split the "Chase Data for Send" tab into separate workbooks by column "Card #" (column I -> like eye, not L)
  2. AND name each workbook as the original file name (Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1.xlsx) PLUS "-" "Card #" (Example: Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1 - 5574.xlsx)
  3. AND (if possible) save to Google Drive -> same location as the original file but in a folder for the separate files
    1. OR save to Downloads and I'll save to Google Drive manually
  4. AND (if possible) email each separate file LINK from Google Drive via Gmail using the addresses from column "Employee Email" (column L) to each employee
    1. AND CC a specific email address, such as accounting@accounting.com
    2. AND include a set message template:
      1. Hello -

        Please see link below for June credit card charges. Can you assist with location/category selection?

        Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1 - 5574.xlsx <--- Link to File in Google Drive

        Thanks,
      2. (Email Signature)

That's not too much to ask, right? *ha*



Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1 (test).xlsx
ABCDEFGHIJKL
1CardTransaction DatePost DateDescriptionCategoryType Amount NOTES Card #Card StatusEmployee NameEmployee Email
227517/30/20237/31/2023ZAPIER.COM/CHARGEOffice & ShippingSale(29.99)2751OpenAllen Brownallen@allen.com
323737/30/20237/31/2023CEBROKER CEBROKER.COMOffice & ShippingSale(39.99)2373OpenSarah Knightsarah@sarah.com
45347/28/20237/30/2023AMZN Mktp USMerchandise & InventoryReturn76.560534OpenDavid Smithdavid@david.com
55347/28/20237/30/2023WF WAYFAIR3939481283Merchandise & InventoryReturn175.620534OpenDavid Smithdavid@david.com
627517/27/20237/28/2023GITHUB INC.Professional ServicesSale(16.00)2751OpenAllen Brownallen@allen.com
727517/27/20237/28/2023NPM INC.Office & ShippingSale(7.00)2751OpenAllen Brownallen@allen.com
85347/23/20237/27/2023SQ *SQUARE HARDWAREOffice & ShippingReturn191.160534OpenDavid Smithdavid@david.com
927517/25/20237/26/2023WEBFLOW.COMProfessional ServicesSale(45.00)2751OpenAllen Brownallen@allen.com
1027517/24/20237/26/2023WINGATE INNTravelSale(151.20)2751OpenAllen Brownallen@allen.com
115347/24/20237/25/2023WF WAYFAIR3940855263Merchandise & InventoryReturn270.210534OpenDavid Smithdavid@david.com
1227517/24/20237/25/2023CARIBOU COFFEE AFood & DrinkSale(7.56)2751OpenAllen Brownallen@allen.com
1327517/25/20237/25/2023UBER TRIPTravelSale(30.92)2751OpenAllen Brownallen@allen.com
1423737/23/20237/25/2023GOLDEN EAGLE SUPERMARKETFood & DrinkSale(105.68)2373OpenSarah Knightsarah@sarah.com
155347/23/20237/24/2023SF WASHMiscellaneousSale(42.00)0534OpenDavid Smithdavid@david.com
1627517/23/20237/24/2023EXXON GATEWAY CONVENIENCEGasSale(43.52)2751OpenAllen Brownallen@allen.com
1710797/22/20237/23/2023SP SITN SLEEPRepair & MaintenanceSale(6,821.69)1079ClosedKelly Joneskelly@kelly.com
1827517/21/20237/23/202307890 - RESIDENCE INN DENTravelSale(39.00)2751OpenAllen Brownallen@allen.com
1927517/21/20237/23/2023PANZANOFood & DrinkSale(13.88)2751OpenAllen Brownallen@allen.com
2027517/21/20237/23/2023KIMPTON HOTEL MONACO DENTravelSale(5.00)2751OpenAllen Brownallen@allen.com
2127517/21/20237/23/2023MAD GREENS MG0103Food & DrinkSale(13.84)2751OpenAllen Brownallen@allen.com
2227517/21/20237/23/2023PAY*THE GOLDEN MILLFood & DrinkSale(37.11)2751OpenAllen Brownallen@allen.com
2327517/19/20237/21/2023STAPLES 00111161Office & ShippingSale(6.94)2751OpenAllen Brownallen@allen.com
2427517/20/20237/21/2023PEETS COFFEEMerchandise & InventorySale(10.43)2751OpenAllen Brownallen@allen.com
2527517/20/20237/21/2023HUMBLE HOUSEFood & DrinkSale(5.14)2751OpenAllen Brownallen@allen.com
2623737/19/20237/20/2023THE UPS STORE 6757Office & ShippingSale(75.27)2373OpenSarah Knightsarah@sarah.com
275347/4/20237/19/2023OMEGA #680Merchandise & InventoryAdjustment6,460.500534OpenDavid Smithdavid@david.com
2827517/18/20237/19/2023ZOOM.US 888-799-9666Bills & UtilitiesSale(675.48)2751OpenAllen Brownallen@allen.com
295347/17/20237/18/2023AMZN Mktp US*3L0TA1QR3Merchandise & InventorySale(59.51)0534OpenDavid Smithdavid@david.com
305347/17/20237/17/2023AMZN Mktp US*W869B4L33Merchandise & InventorySale(7.03)0534OpenDavid Smithdavid@david.com
315347/16/20237/17/2023SF WASHMiscellaneousSale(42.00)0534OpenDavid Smithdavid@david.com
325347/16/20237/17/2023SF WASHMiscellaneousSale(42.00)0534OpenDavid Smithdavid@david.com
335347/17/20237/17/2023AMZN Mktp US*FC2BH9RW3Merchandise & InventorySale(201.48)0534OpenDavid Smithdavid@david.com
345347/16/20237/17/2023Amazon.com*9I0QX9G43Merchandise & InventorySale(16.23)0534OpenDavid Smithdavid@david.com
355347/15/20237/17/2023OMEGA #680Merchandise & InventoryReturn6,460.500534OpenDavid Smithdavid@david.com
365347/16/20237/17/2023WESTELM.COMRepair & MaintenanceSale(146.88)0534OpenDavid Smithdavid@david.com
375347/16/20237/17/2023WESTELM.COMRepair & MaintenanceSale(371.51)0534OpenDavid Smithdavid@david.com
385347/16/20237/17/2023AMZN Mktp US*KP1EK4UY3Merchandise & InventorySale(8.65)0534OpenDavid Smithdavid@david.com
395347/14/20237/16/2023THE PROMETHEUS GROUP INCHealth & WellnessSale(1,048.00)0534OpenDavid Smithdavid@david.com
405347/14/20237/16/2023TARGET.COM *Merchandise & InventorySale(41.93)0534OpenDavid Smithdavid@david.com
415347/14/20237/16/2023Amazon.com*BT6SQ1D53Merchandise & InventorySale(41.15)0534OpenDavid Smithdavid@david.com
425347/14/20237/16/2023AMZN Mktp US*R78JS3O23Merchandise & InventorySale(28.67)0534OpenDavid Smithdavid@david.com
435347/14/20237/16/2023SP NAKED NUTRITIONFood & DrinkSale(121.97)0534OpenDavid Smithdavid@david.com
445347/14/20237/16/2023AMZN Mktp US*SM4RI48X3Merchandise & InventorySale(19.46)0534OpenDavid Smithdavid@david.com
455347/15/20237/16/2023AMZN Mktp US*V35RQ4PC3Merchandise & InventorySale(22.49)0534OpenDavid Smithdavid@david.com
465347/15/20237/16/2023STORE*BLUE RIBBON SUSHFood & DrinkSale(13.14)0534OpenDavid Smithdavid@david.com
475347/15/20237/16/2023AMZN Mktp US*N10KG1X13Merchandise & InventorySale(24.92)0534OpenDavid Smithdavid@david.com
485347/15/20237/16/2023AMZN Mktp US*EO73G5P43Merchandise & InventorySale(14.03)0534OpenDavid Smithdavid@david.com
495347/14/20237/16/2023TARGET.COM *Merchandise & InventoryReturn41.930534OpenDavid Smithdavid@david.com
505347/14/20237/16/2023INTIMATE ROSEProfessional ServicesSale(362.37)0534OpenDavid Smithdavid@david.com
515347/14/20237/16/2023TARGET.COM *Merchandise & InventorySale(105.92)0534OpenDavid Smithdavid@david.com
525347/14/20237/16/2023SP NAKED NUTRITIONFood & DrinkSale(71.98)0534OpenDavid Smithdavid@david.com
5327517/13/20237/16/2023KIMPTON HOTEL MONACO DENTravelSale(365.56)2751OpenAllen Brownallen@allen.com
5427517/11/20237/12/2023ADOBE *800-833-6687Office & ShippingSale(137.08)2751OpenAllen Brownallen@allen.com
5527517/6/20237/7/2023SANITY.IOOffice & ShippingSale(12.00)2751OpenAllen Brownallen@allen.com
5627517/6/20237/7/2023ALGOLIA 2I2307489569Office & ShippingSale(5.00)2751OpenAllen Brownallen@allen.com
5727517/5/20237/6/2023ADOBE *800-833-6687Office & ShippingSale(1,242.22)2751OpenAllen Brownallen@allen.com
5827517/4/20237/5/2023FIGMA MONTHLY RENEWALProfessional ServicesSale(175.00)2751OpenAllen Brownallen@allen.com
5927517/2/20237/3/2023Amazon web servicesOffice & ShippingSale(1,839.15)2751OpenAllen Brownallen@allen.com
6027516/30/20237/2/2023ZAPIER.COM/CHARGEOffice & ShippingSale(29.99)2751OpenAllen Brownallen@allen.com
6127517/1/20237/2/2023GOOGLE*CLOUD GRNBPBProfessional ServicesSale(8.06)2751OpenAllen Brownallen@allen.com
Chase Data for Send
Cell Formulas
RangeFormula
I2:I61I2=VLOOKUP(A2,'Employee VLookup'!B:G,2,FALSE)
J2:J61J2=VLOOKUP(A2,'Employee VLookup'!B:G,3,FALSE)
K2:K61K2=VLOOKUP(A2,'Employee VLookup'!B:G,5,FALSE)
L2:L61L2=VLOOKUP(I2,'Employee VLookup'!C:G,5,FALSE)
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
  1. Split the "Chase Data for Send" tab into separate workbooks by column "Card #" (column I -> like eye, not L)
  2. AND name each workbook as the original file name (Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1.xlsx) PLUS "-" "Card #" (Example: Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1 - 5574.xlsx)
  3. AND (if possible) save to Google Drive -> same location as the original file but in a folder for the separate files
    1. OR save to Downloads and I'll save to Google Drive manually
This macro should cover your first 3 requirements, saving the new workbooks in your Downloads folder (the saveInFolder string).

I think you need Google Drive for Desktop to have Google Drive folders available in File Explorer; with that you might be able to change the saveInFolder string to a Google Drive folder and the macro will save the new workbooks directly to Google Drive.

VBA Code:
Public Sub Split_By_Card_Number_to_New_Workbooks()

    Dim saveInFolder As String
    Dim splitSheet As Worksheet
    Dim cardNoDict As Object
    Dim cardNoCell As Range
    Dim cardNos As Variant, i As Long
            
    saveInFolder = Environ("USERPROFILE") & "\Downloads\"
    
    Set splitSheet = ThisWorkbook.Worksheets("Chase Data for Send")
    
    'Create dictionary of unique card numbers in column I
    
    Set cardNoDict = CreateObject("Scripting.Dictionary")
    With splitSheet
        For Each cardNoCell In .Range("I2", .Cells(.Rows.Count, "I").End(xlUp))
            cardNoDict(cardNoCell.Value) = 1
        Next
    End With
       
    Application.ScreenUpdating = False
       
    'Loop through each unique card number
    
    cardNos = cardNoDict.Keys
    For i = LBound(cardNos) To UBound(cardNos)
        'Copy sheet, creating a new workbook and save it with this card number in file name
        splitSheet.Copy
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveAs saveInFolder & Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) & " - " & cardNos(i) & ".xlsx", xlOpenXMLWorkbook
        Application.DisplayAlerts = True
        
        With ActiveWorkbook.Worksheets(1).UsedRange
            'Copy and paste as values to remove formulas and links to original workbook
            .Cells.Copy
            .Cells.PasteSpecial xlPasteValues
            .Cells(1).Select
            Application.CutCopyMode = False
            
            'Autofilter on column I for rows NOT equal to this card number and delete visible rows
            .AutoFilter Field:=9, Criteria1:="<>" & cardNos(i) & "*", Operator:=xlFilterValues         'Note - without "*" filter doesn't work
            .Offset(1).EntireRow.Delete
            .AutoFilter
        End With
        ActiveWorkbook.Close True
    Next
   
    Application.ScreenUpdating = True
    
    MsgBox "Created new workbooks in " & saveInFolder, vbInformation
    
End Sub
 
Upvote 0
This macro should cover your first 3 requirements, saving the new workbooks in your Downloads folder (the saveInFolder string).

I think you need Google Drive for Desktop to have Google Drive folders available in File Explorer; with that you might be able to change the saveInFolder string to a Google Drive folder and the macro will save the new workbooks directly to Google Drive.

VBA Code:
Public Sub Split_By_Card_Number_to_New_Workbooks()

    Dim saveInFolder As String
    Dim splitSheet As Worksheet
    Dim cardNoDict As Object
    Dim cardNoCell As Range
    Dim cardNos As Variant, i As Long
           
    saveInFolder = Environ("USERPROFILE") & "\Downloads\"
   
    Set splitSheet = ThisWorkbook.Worksheets("Chase Data for Send")
   
    'Create dictionary of unique card numbers in column I
   
    Set cardNoDict = CreateObject("Scripting.Dictionary")
    With splitSheet
        For Each cardNoCell In .Range("I2", .Cells(.Rows.Count, "I").End(xlUp))
            cardNoDict(cardNoCell.Value) = 1
        Next
    End With
      
    Application.ScreenUpdating = False
      
    'Loop through each unique card number
   
    cardNos = cardNoDict.Keys
    For i = LBound(cardNos) To UBound(cardNos)
        'Copy sheet, creating a new workbook and save it with this card number in file name
        splitSheet.Copy
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveAs saveInFolder & Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) & " - " & cardNos(i) & ".xlsx", xlOpenXMLWorkbook
        Application.DisplayAlerts = True
       
        With ActiveWorkbook.Worksheets(1).UsedRange
            'Copy and paste as values to remove formulas and links to original workbook
            .Cells.Copy
            .Cells.PasteSpecial xlPasteValues
            .Cells(1).Select
            Application.CutCopyMode = False
           
            'Autofilter on column I for rows NOT equal to this card number and delete visible rows
            .AutoFilter Field:=9, Criteria1:="<>" & cardNos(i) & "*", Operator:=xlFilterValues         'Note - without "*" filter doesn't work
            .Offset(1).EntireRow.Delete
            .AutoFilter
        End With
        ActiveWorkbook.Close True
    Next
  
    Application.ScreenUpdating = True
   
    MsgBox "Created new workbooks in " & saveInFolder, vbInformation
   
End Sub

HOW ARE YOU SO SMART?! This worked perfectly!!!! Thank you so much!!!! I could cry! Thank you so very much!!

Jennifer
 
Upvote 0
This macro should cover your first 3 requirements, saving the new workbooks in your Downloads folder (the saveInFolder string).

I think you need Google Drive for Desktop to have Google Drive folders available in File Explorer; with that you might be able to change the saveInFolder string to a Google Drive folder and the macro will save the new workbooks directly to Google Drive.

VBA Code:
Public Sub Split_By_Card_Number_to_New_Workbooks()

    Dim saveInFolder As String
    Dim splitSheet As Worksheet
    Dim cardNoDict As Object
    Dim cardNoCell As Range
    Dim cardNos As Variant, i As Long
           
    saveInFolder = Environ("USERPROFILE") & "\Downloads\"
   
    Set splitSheet = ThisWorkbook.Worksheets("Chase Data for Send")
   
    'Create dictionary of unique card numbers in column I
   
    Set cardNoDict = CreateObject("Scripting.Dictionary")
    With splitSheet
        For Each cardNoCell In .Range("I2", .Cells(.Rows.Count, "I").End(xlUp))
            cardNoDict(cardNoCell.Value) = 1
        Next
    End With
      
    Application.ScreenUpdating = False
      
    'Loop through each unique card number
   
    cardNos = cardNoDict.Keys
    For i = LBound(cardNos) To UBound(cardNos)
        'Copy sheet, creating a new workbook and save it with this card number in file name
        splitSheet.Copy
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveAs saveInFolder & Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) & " - " & cardNos(i) & ".xlsx", xlOpenXMLWorkbook
        Application.DisplayAlerts = True
       
        With ActiveWorkbook.Worksheets(1).UsedRange
            'Copy and paste as values to remove formulas and links to original workbook
            .Cells.Copy
            .Cells.PasteSpecial xlPasteValues
            .Cells(1).Select
            Application.CutCopyMode = False
           
            'Autofilter on column I for rows NOT equal to this card number and delete visible rows
            .AutoFilter Field:=9, Criteria1:="<>" & cardNos(i) & "*", Operator:=xlFilterValues         'Note - without "*" filter doesn't work
            .Offset(1).EntireRow.Delete
            .AutoFilter
        End With
        ActiveWorkbook.Close True
    Next
  
    Application.ScreenUpdating = True
   
    MsgBox "Created new workbooks in " & saveInFolder, vbInformation
   
End Sub


Is there a way that you know of to do this part?

  1. AND (if possible) email each separate file LINK from Google Drive via Gmail using the addresses from column "Employee Email" (column L) to each employee
    1. AND CC a specific email address, such as accounting@accounting.com
    2. AND include a set message template:
      1. Hello -

        Please see link below for June credit card charges. Can you assist with location/category selection?

        Chase - CC Activity - 07.01.23 - 07.31.23 - Data v1 - 5574.xlsx <--- Link to File in Google Drive

        Thanks,
      2. (Email Signature)
 
Upvote 0
Sending an email from a Gmail account directly via Gmail's SMTP server (not via Outlook) can be done using Windows CDO (Collaboration Data Objects). However, the CDO library might not be installed on your machine and you'll have to find it on the web and install it.

Run this macro and if an error occurs it means CDO isn't installed.

VBA Code:
Public Sub CDO_Test()

    Dim iMsg As Object, iConf As Object
    
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    
    MsgBox "Success - CDO is installed"

End Sub
 
Upvote 0
Sending an email from a Gmail account directly via Gmail's SMTP server (not via Outlook) can be done using Windows CDO (Collaboration Data Objects). However, the CDO library might not be installed on your machine and you'll have to find it on the web and install it.

Run this macro and if an error occurs it means CDO isn't installed.

VBA Code:
Public Sub CDO_Test()

    Dim iMsg As Object, iConf As Object
   
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
   
    MsgBox "Success - CDO is installed"

End Sub
Okay - it didn't work. However, I ended up moving everything to Google Drive manually, then sharing folders and access to folders with specific users.

I have a follow up question about drop-down menus on the sheet......... If I want to create lists in a second tab and then have drop-downs in the first tab link to them, is there a way to have the sheets split by card # on the first tab and bring both that first tab PLUS the full second tab over and stay linked so my drop-downs will stay intact?

I also tried putting the list on the first tab and linking to drop-downs, but when it split the sheets up, it cut the lists up, too..... Hopefully I'm making sense. I can create a test file and send if not!
 
Upvote 0
Okay - it didn't work. However, I ended up moving everything to Google Drive manually, then sharing folders and access to folders with specific users.

I have a follow up question about drop-down menus on the sheet......... If I want to create lists in a second tab and then have drop-downs in the first tab link to them, is there a way to have the sheets split by card # on the first tab and bring both that first tab PLUS the full second tab over and stay linked so my drop-downs will stay intact?

I also tried putting the list on the first tab and linking to drop-downs, but when it split the sheets up, it cut the lists up, too..... Hopefully I'm making sense. I can create a test file and send if not!
Sending an email from a Gmail account directly via Gmail's SMTP server (not via Outlook) can be done using Windows CDO (Collaboration Data Objects). However, the CDO library might not be installed on your machine and you'll have to find it on the web and install it.

Run this macro and if an error occurs it means CDO isn't installed.

VBA Code:
Public Sub CDO_Test()

    Dim iMsg As Object, iConf As Object
   
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
   
    MsgBox "Success - CDO is installed"

End Sub



Okay. I'm back!

How can I take this sheet....

1. Divide up by card number like you did before on column M (was I like "eye" previously) -> Tab is named "Current Month Expenses"
2. Bring a second tab with it named "Category VLookup"
3. So my drop-down's in columns "I" and "J" (eye and jay) will still pull from "Category VLookup"

- I was able to correct the original script you sent me so it's pulling from column "M" and the new tab name.
- It ran successfully.
- However, the drop-downs won't work because the second tab isn't there anymore.
- I tried putting the drop-down info on tab "Current Month Expenses" but it cuts it off based on the lines that move over to the different sheets.


File name: "Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsx"

Tab 1: "Current Month Expenses"

Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsm
ABCDEFGHIJKLMNOPQR
1CardTransaction DatePost DateDescriptionCategoryTypeAmountPAYEE (VENDOR) (Correct if necessary)CATEGORYCLASS / LOCATIONCOMMENTS / CATEGORY CORRECTIONTrans #Card #Line Item #Tran AmtCard StatusEmployee NameEmployee Email
290506/27/20237/4/2023VIEWLINE RESORT SNOWMASSTravelReturn1,540.86 Viewline Resort Snowmass 190509050-1(1,540.86)OpenSarah Smithsarah@email.com
388646/30/20237/2/2023INTUIT *QBooks OnlineOffice & ShippingSale(85.00) Intuit QuickBooks Online 288648864-285.00OpenDavid Jonesdavid@email.com
488646/30/20237/2/2023INTUIT *QBooks OnlineOffice & ShippingSale(85.00) Intuit QuickBooks Online 388648864-385.00OpenDavid Jonesdavid@email.com
590506/30/20237/2/2023PAPER OR PLASTICFood & DrinkSale(58.48) Paper or Plastic 490509050-458.48OpenSarah Smithsarah@email.com
690507/1/20237/2/2023GOOGLE *GSUITE_theorigOffice & ShippingSale(1,994.00) Google Gsuite 590509050-51,994.00OpenSarah Smithsarah@email.com
790507/1/20237/2/2023GOOGLE *SVCStheoriginwBills & UtilitiesSale(72.81) Google SVCs 690509050-672.81OpenSarah Smithsarah@email.com
890507/1/20237/2/2023Indeed JobsProfessional ServicesSale(272.18) Indeed Jobs 790509050-7272.18OpenSarah Smithsarah@email.com
952987/2/20237/3/2023AMZN Mktp US*3B8FO1EA3Merchandise & InventorySale(43.42) Amazon.com 852985298-843.42OpenAmy Thompsonamy@email.com
1088647/4/20237/5/2023FAXAGEProfessional ServicesSale(79.80) Faxage 988648864-979.80OpenDavid Jonesdavid@email.com
115347/4/20237/19/2023OMEGA #680Merchandise & InventoryAdjustment6,460.50 Omega 1005340534-10(6,460.50)OpenDavid Jonesdavid@email.com
1288647/5/20237/5/2023Payment Thank You - WebPayment22,870.55 Credit Card Payment 1188648864-11(22,870.55)OpenDavid Jonesdavid@email.com
1388647/5/20237/6/2023YAHOO SMALL BUSINESSBills & UtilitiesSale(24.98) Yahoo Small Business 1288648864-1224.98OpenDavid Jonesdavid@email.com
1490507/5/20237/6/2023PAPER OR P* PAPER OR PFood & DrinkSale(45.19) Paper or Plastic 1390509050-1345.19OpenSarah Smithsarah@email.com
1588647/5/20237/7/2023ATHENS SERVICESBills & UtilitiesSale(252.66) Athens Services 1488648864-14252.66OpenDavid Jonesdavid@email.com
1688647/6/20237/7/2023LINKEDIN *RECRUITERBills & UtilitiesSale(139.99) LinkedIn Recruiter 1588648864-15139.99OpenDavid Jonesdavid@email.com
1790507/6/20237/9/2023DELTA AIR 0062125338550TravelSale(34.00) Delta Air 1690509050-1634.00OpenSarah Smithsarah@email.com
1874147/7/20237/7/2023Payment Thank You - WebPayment224.00 Credit Card Payment 1774147414-17(224.00)OpenDavid Jonesdavid@email.com
1990507/8/20237/9/2023Indeed JobsProfessional ServicesSale(600.00) Indeed Jobs 1890509050-18600.00OpenSarah Smithsarah@email.com
2090507/8/20237/9/2023Amazon.comMerchandise & InventoryReturn52.61 Amazon.com 1990509050-19(52.61)OpenSarah Smithsarah@email.com
2188647/9/20237/10/2023ADOBE *800-833-6687Office & ShippingSale(10.81) Adobe 2088648864-2010.81OpenDavid Jonesdavid@email.com
2259107/10/20237/11/2023ALFRED COFFEE ORDERFood & DrinkSale(39.30) Alfred Coffee 2159105910-2139.30OpenJennifer Johnsonjennifer@email.com
2390507/10/20237/11/2023Indeed JobsProfessional ServicesSale(120.00) Indeed Jobs 2290509050-22120.00OpenSarah Smithsarah@email.com
2490507/10/20237/11/2023Indeed JobsProfessional ServicesSale(300.00) Indeed Jobs 2390509050-23300.00OpenSarah Smithsarah@email.com
2588647/10/20237/12/2023DIRECT CARE STOREMerchandise & InventorySale(564.10) Direct Care Store 2488648864-24564.10OpenDavid Jonesdavid@email.com
2688647/11/20237/11/2023UBER TRIPTravelSale(8.06) Uber Trip 2588648864-258.06OpenDavid Jonesdavid@email.com
2790507/11/20237/11/2023Indeed JobsProfessional ServicesSale(528.19) Indeed Jobs 2690509050-26528.19OpenSarah Smithsarah@email.com
2888647/11/20237/12/2023Payment Thank You - WebPayment35,899.52 Credit Card Payment 2788648864-27(35,899.52)OpenDavid Jonesdavid@email.com
2990507/11/20237/12/2023Rapha Racing San FrancMerchandise & InventorySale(11.25) Rapha Racing SF 2890509050-2811.25OpenSarah Smithsarah@email.com
3090507/11/20237/12/2023UBER TRIPTravelSale(44.39) Uber Trip 2990509050-2944.39OpenSarah Smithsarah@email.com
3190507/11/20237/12/2023WHOLEFDS NOE 10379Food & DrinkSale(35.17) Wholefoods 3090509050-3035.17OpenSarah Smithsarah@email.com
3288647/11/20237/13/2023OFFICE DEPOT #2206Office & ShippingSale(64.57) Office Depot 3188648864-3164.57OpenDavid Jonesdavid@email.com
3388647/11/20237/13/2023DIRECT CARE STOREMerchandise & InventorySale(711.40) Direct Care Store 3288648864-32711.40OpenDavid Jonesdavid@email.com
3488647/11/20237/13/2023Preferred Therapy ProvMiscellaneousSale(167.00) Preferred Therapy Prov 3388648864-33167.00OpenDavid Jonesdavid@email.com
3588647/11/20237/13/2023Preferred Therapy ProvMiscellaneousSale(167.00) Preferred Therapy Prov 3488648864-34167.00OpenDavid Jonesdavid@email.com
3690507/11/20237/13/2023BI-RITE CATERINGFood & DrinkSale(592.45) Bi-Rite Catering 3590509050-35592.45OpenSarah Smithsarah@email.com
3788647/12/20237/12/2023VZWRLSS*APOCC VISEBills & UtilitiesSale(112.91) Verizon Wireless 3688648864-36112.91OpenDavid Jonesdavid@email.com
3890507/12/20237/12/2023UBER TRIPTravelSale(38.96) Uber Trip 3790509050-3738.96OpenSarah Smithsarah@email.com
Current Month Expenses
Cells with Data Validation
CellAllowCriteria
K2Any value
I2:I169List='Category VLookup'!$A$2:$A$1048576
J2:J169List='Category VLookup'!$F$2:$F$1048576




Tab 2: "Category VLookup"

Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsm
ABCDEF
1CategoryTOWOPTCAOPTFLOPTNYClass
2OTHER TRANSACTION (Please Comment)OTHER/NOT LISTED (Please Comment)
3Advertising & Marketing:Advertising Analytics6000-046000-046000-046000-04Corporate:Business Development
4Advertising & Marketing:B2B Marketing6000-086000-086000-086000-08Corporate:Clinical Operations
5Advertising & Marketing:Creative Design6000-096000-096000-096000-09Corporate:Corporate Operations
6Advertising & Marketing:Marketing Events6000-056000-056000-056000-05Corporate:Finance & Accounting
7Advertising & Marketing:Other Marketing6000-996000-996000-996000-99Corporate:General Corporate
8Advertising & Marketing:Printed Advertising6000-106000-106000-106000-10Corporate:Holdings
9Advertising & Marketing:Provider ReferalCorporate:Marketing
10Advertising & Marketing:SEO & Ad Words6000-016000-016000-016000-01Corporate:People Ops
11Advertising & Marketing:Social Media6000-036000-036000-036000-03Corporate:Product & Engineering
12Business Development:Data Analytics/Market Research6001-016001-016001-016001-01Corporate:Revenue Cycle Management
13Business Development:Product & Engineering6001-036001-036001-036001-03Corporate:Senior Leadership
14Business Development:Recruitment Events6001-046001-046001-046001-04Corporate:Other (Please Comment)
15Business Development:Travel to New Markets6001-026001-026001-026001-02Medical Clinics:Austin
16Cost of Goods Sold:Management Expense5005500550055005Medical Clinics:Brentwood
17Cost of Goods Sold:Medical Supplies5020502050205020Medical Clinics:Rollingwood
18Cost of Goods Sold:Medical Supplies & Product Shipping5010501050105010Medical Clinics:Round Rock
19Cost of Goods Sold:Provider Wages, Taxes, & Benefits:Provider Salaries & Wages:Provider Contractors5300-035300-035300-035300-03Medical Clinics:San Antonio
20Cost of Goods Sold:Retail Inventory5030503050305030Medical Clinics:San Francisco
21Credit Card PaymentMedical Clinics:Sugar Land
22Equipment1560156015601560Medical Clinics:West Hollywood
23Equipment:Bebe HoldingMedical Clinics:West Loop
24Facilities:Cleaning6152615261526152Medical Clinics:Other (Please Comment)
25Facilities:Common Area Maintenance & RE Tax Share6151615161516151Remote
26Facilities:Rent & Lease6140614061406140
27Facilities:Repairs & Maintenance6150615061506150
28Facilities:Telephone & Internet6201620162016201
29Facilities:Utilities6200620062006200
30General & Administrative:Education & Training:Continuing Medical Education6550-016550-016550-016550-01
31General & Administrative:Education & Training:Corporate Training6550-056550-056550-056550-05
32General & Administrative:Education & Training:Offsite Meetings6550-036550-036550-036550-03
33General & Administrative:Education & Training:Professional Development6550-046550-046550-046550-04
34General & Administrative:Meals & Entertainment6540654065406540
35General & Administrative:Meals & Entertainment:Charitable Contribution6540-206540-206540-206540-20
36General & Administrative:Meals & Entertainment:Employee Awards & Gifts6540-116540-116540-116540-11
37General & Administrative:Meals & Entertainment:Entertainment6540-026540-026540-026540-02
38General & Administrative:Meals & Entertainment:Gifts & Tips6540-106540-106540-106540-10
39General & Administrative:Meals & Entertainment:Holiday Events6540-036540-036540-036540-03
40General & Administrative:Meals & Entertainment:Meals6540-016540-016540-016540-01
41General & Administrative:Meals & Entertainment:Other Meals & Entertainment6540-996540-996540-996540-99
42General & Administrative:Meals & Entertainment:Team Building Meals6540-046540-046540-046540-04
43General & Administrative:Professional Service:Bank Charges & Fees6520-066520-066520-066520-06
44General & Administrative:Professional Service:Billing & Collections6520-036520-036520-036520-03
45General & Administrative:Professional Service:Consulting6520-096520-096520-096520-09
46General & Administrative:Professional Service:Credit Card Fees6520-076520-076520-076520-07
47General & Administrative:Professional Service:Legal Fees6520-016520-016520-016520-01
48General & Administrative:Professional Service:Other Professional Services6520-996520-996520-996520-99
49General & Administrative:Recruiting:Other Recruiting6560-996560-996560-996560-99
50General & Administrative:Recruiting:Recruiting Ads6560-016560-016560-016560-01
51General & Administrative:Recruiting:Recruiting Travel6560-026560-026560-026560-02
52General & Administrative:Taxes & Reports:Annual Reports & Filings6570-016570-016570-016570-01
53General & Administrative:Travel:Auto Related Expenses6510-016510-016510-016510-01
54General & Administrative:Travel:Flights/Trains6510-046510-046510-046510-04
55General & Administrative:Travel:Hotel/Lodging6510-056510-056510-056510-05
56General & Administrative:Travel:Other Travel6510-996510-996510-996510-99
57General & Administrative:Travel:Parking6510-066510-066510-066510-06
58General & Administrative:Travel:Ride Share6510-026510-026510-026510-02
59Income Taxes:Federal Income Tax7550-017550-017550-017550-01
60Income Taxes:Local Income Taxes7550-037550-037550-037550-03
61Income Taxes:State Income Tax7550-027550-027550-027550-02
62Interest Expense7500-027500-027500-027500-02
63Miscellaneous AR1081108110811081
64Operating:Covid Testing6400640064006400
65Operating:Dues and Subscriptions6413641364136413
66Operating:Office Supplies6411641164116411
67Operating:Postage & Shipping6412641264126412
68Operating:Printing6414641464146414
69Operating:Technology Expenses6430643064306430
70Operating:Technology Expenses:Expensed Tech Equipment6430-026430-026430-026430-02
71Operating:Technology Expenses:Internet Subscriptions6430-046430-046430-046430-04
72Operating:Technology Expenses:IT6430-016430-016430-016430-01
73Operating:Technology Expenses:Other Tech Expenses6430-996430-996430-996430-99
74Operating:Technology Expenses:Software as a Service6430-036430-036430-036430-03
75Prepaid Expenses1100110011001100
76Receivables - Purchase1040104010401040
77Revenue:Discounts/Refunds Given4500450045004500
78Revenue:Other Revenue:Retail Sales4020402040204020
79Suspense Transaction (Please Comment)
80Taxes & Licenses (Please Comment)
81Uncategorized Asset1050105010501050
82Uncategorized Expense6190619061906190
83Wages, Taxes, & Benefits:Benefits6320632063206320
84Wages, Taxes, & Benefits:Benefits:Other Benefits6320-996320-996320-996320-99
85Wages, Taxes, & Benefits:Salaries & Wages:Contractors6300-046300-046300-046300-04
Category VLookup
 
Upvote 0
Okay. I'm back!

How can I take this sheet....

1. Divide up by card number like you did before on column M (was I like "eye" previously) -> Tab is named "Current Month Expenses"
2. Bring a second tab with it named "Category VLookup"
3. So my drop-down's in columns "I" and "J" (eye and jay) will still pull from "Category VLookup"

- I was able to correct the original script you sent me so it's pulling from column "M" and the new tab name.
- It ran successfully.
- However, the drop-downs won't work because the second tab isn't there anymore.
- I tried putting the drop-down info on tab "Current Month Expenses" but it cuts it off based on the lines that move over to the different sheets.


File name: "Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsx"

Tab 1: "Current Month Expenses"

Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsm
ABCDEFGHIJKLMNOPQR
1CardTransaction DatePost DateDescriptionCategoryTypeAmountPAYEE (VENDOR) (Correct if necessary)CATEGORYCLASS / LOCATIONCOMMENTS / CATEGORY CORRECTIONTrans #Card #Line Item #Tran AmtCard StatusEmployee NameEmployee Email
290506/27/20237/4/2023VIEWLINE RESORT SNOWMASSTravelReturn1,540.86 Viewline Resort Snowmass 190509050-1(1,540.86)OpenSarah Smithsarah@email.com
388646/30/20237/2/2023INTUIT *QBooks OnlineOffice & ShippingSale(85.00) Intuit QuickBooks Online 288648864-285.00OpenDavid Jonesdavid@email.com
488646/30/20237/2/2023INTUIT *QBooks OnlineOffice & ShippingSale(85.00) Intuit QuickBooks Online 388648864-385.00OpenDavid Jonesdavid@email.com
590506/30/20237/2/2023PAPER OR PLASTICFood & DrinkSale(58.48) Paper or Plastic 490509050-458.48OpenSarah Smithsarah@email.com
690507/1/20237/2/2023GOOGLE *GSUITE_theorigOffice & ShippingSale(1,994.00) Google Gsuite 590509050-51,994.00OpenSarah Smithsarah@email.com
790507/1/20237/2/2023GOOGLE *SVCStheoriginwBills & UtilitiesSale(72.81) Google SVCs 690509050-672.81OpenSarah Smithsarah@email.com
890507/1/20237/2/2023Indeed JobsProfessional ServicesSale(272.18) Indeed Jobs 790509050-7272.18OpenSarah Smithsarah@email.com
952987/2/20237/3/2023AMZN Mktp US*3B8FO1EA3Merchandise & InventorySale(43.42) Amazon.com 852985298-843.42OpenAmy Thompsonamy@email.com
1088647/4/20237/5/2023FAXAGEProfessional ServicesSale(79.80) Faxage 988648864-979.80OpenDavid Jonesdavid@email.com
115347/4/20237/19/2023OMEGA #680Merchandise & InventoryAdjustment6,460.50 Omega 1005340534-10(6,460.50)OpenDavid Jonesdavid@email.com
1288647/5/20237/5/2023Payment Thank You - WebPayment22,870.55 Credit Card Payment 1188648864-11(22,870.55)OpenDavid Jonesdavid@email.com
1388647/5/20237/6/2023YAHOO SMALL BUSINESSBills & UtilitiesSale(24.98) Yahoo Small Business 1288648864-1224.98OpenDavid Jonesdavid@email.com
1490507/5/20237/6/2023PAPER OR P* PAPER OR PFood & DrinkSale(45.19) Paper or Plastic 1390509050-1345.19OpenSarah Smithsarah@email.com
1588647/5/20237/7/2023ATHENS SERVICESBills & UtilitiesSale(252.66) Athens Services 1488648864-14252.66OpenDavid Jonesdavid@email.com
1688647/6/20237/7/2023LINKEDIN *RECRUITERBills & UtilitiesSale(139.99) LinkedIn Recruiter 1588648864-15139.99OpenDavid Jonesdavid@email.com
1790507/6/20237/9/2023DELTA AIR 0062125338550TravelSale(34.00) Delta Air 1690509050-1634.00OpenSarah Smithsarah@email.com
1874147/7/20237/7/2023Payment Thank You - WebPayment224.00 Credit Card Payment 1774147414-17(224.00)OpenDavid Jonesdavid@email.com
1990507/8/20237/9/2023Indeed JobsProfessional ServicesSale(600.00) Indeed Jobs 1890509050-18600.00OpenSarah Smithsarah@email.com
2090507/8/20237/9/2023Amazon.comMerchandise & InventoryReturn52.61 Amazon.com 1990509050-19(52.61)OpenSarah Smithsarah@email.com
2188647/9/20237/10/2023ADOBE *800-833-6687Office & ShippingSale(10.81) Adobe 2088648864-2010.81OpenDavid Jonesdavid@email.com
2259107/10/20237/11/2023ALFRED COFFEE ORDERFood & DrinkSale(39.30) Alfred Coffee 2159105910-2139.30OpenJennifer Johnsonjennifer@email.com
2390507/10/20237/11/2023Indeed JobsProfessional ServicesSale(120.00) Indeed Jobs 2290509050-22120.00OpenSarah Smithsarah@email.com
2490507/10/20237/11/2023Indeed JobsProfessional ServicesSale(300.00) Indeed Jobs 2390509050-23300.00OpenSarah Smithsarah@email.com
2588647/10/20237/12/2023DIRECT CARE STOREMerchandise & InventorySale(564.10) Direct Care Store 2488648864-24564.10OpenDavid Jonesdavid@email.com
2688647/11/20237/11/2023UBER TRIPTravelSale(8.06) Uber Trip 2588648864-258.06OpenDavid Jonesdavid@email.com
2790507/11/20237/11/2023Indeed JobsProfessional ServicesSale(528.19) Indeed Jobs 2690509050-26528.19OpenSarah Smithsarah@email.com
2888647/11/20237/12/2023Payment Thank You - WebPayment35,899.52 Credit Card Payment 2788648864-27(35,899.52)OpenDavid Jonesdavid@email.com
2990507/11/20237/12/2023Rapha Racing San FrancMerchandise & InventorySale(11.25) Rapha Racing SF 2890509050-2811.25OpenSarah Smithsarah@email.com
3090507/11/20237/12/2023UBER TRIPTravelSale(44.39) Uber Trip 2990509050-2944.39OpenSarah Smithsarah@email.com
3190507/11/20237/12/2023WHOLEFDS NOE 10379Food & DrinkSale(35.17) Wholefoods 3090509050-3035.17OpenSarah Smithsarah@email.com
3288647/11/20237/13/2023OFFICE DEPOT #2206Office & ShippingSale(64.57) Office Depot 3188648864-3164.57OpenDavid Jonesdavid@email.com
3388647/11/20237/13/2023DIRECT CARE STOREMerchandise & InventorySale(711.40) Direct Care Store 3288648864-32711.40OpenDavid Jonesdavid@email.com
3488647/11/20237/13/2023Preferred Therapy ProvMiscellaneousSale(167.00) Preferred Therapy Prov 3388648864-33167.00OpenDavid Jonesdavid@email.com
3588647/11/20237/13/2023Preferred Therapy ProvMiscellaneousSale(167.00) Preferred Therapy Prov 3488648864-34167.00OpenDavid Jonesdavid@email.com
3690507/11/20237/13/2023BI-RITE CATERINGFood & DrinkSale(592.45) Bi-Rite Catering 3590509050-35592.45OpenSarah Smithsarah@email.com
3788647/12/20237/12/2023VZWRLSS*APOCC VISEBills & UtilitiesSale(112.91) Verizon Wireless 3688648864-36112.91OpenDavid Jonesdavid@email.com
3890507/12/20237/12/2023UBER TRIPTravelSale(38.96) Uber Trip 3790509050-3738.96OpenSarah Smithsarah@email.com
Current Month Expenses
Cells with Data Validation
CellAllowCriteria
K2Any value
I2:I169List='Category VLookup'!$A$2:$A$1048576
J2:J169List='Category VLookup'!$F$2:$F$1048576




Tab 2: "Category VLookup"

Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsm
ABCDEF
1CategoryTOWOPTCAOPTFLOPTNYClass
2OTHER TRANSACTION (Please Comment)OTHER/NOT LISTED (Please Comment)
3Advertising & Marketing:Advertising Analytics6000-046000-046000-046000-04Corporate:Business Development
4Advertising & Marketing:B2B Marketing6000-086000-086000-086000-08Corporate:Clinical Operations
5Advertising & Marketing:Creative Design6000-096000-096000-096000-09Corporate:Corporate Operations
6Advertising & Marketing:Marketing Events6000-056000-056000-056000-05Corporate:Finance & Accounting
7Advertising & Marketing:Other Marketing6000-996000-996000-996000-99Corporate:General Corporate
8Advertising & Marketing:Printed Advertising6000-106000-106000-106000-10Corporate:Holdings
9Advertising & Marketing:Provider ReferalCorporate:Marketing
10Advertising & Marketing:SEO & Ad Words6000-016000-016000-016000-01Corporate:People Ops
11Advertising & Marketing:Social Media6000-036000-036000-036000-03Corporate:Product & Engineering
12Business Development:Data Analytics/Market Research6001-016001-016001-016001-01Corporate:Revenue Cycle Management
13Business Development:Product & Engineering6001-036001-036001-036001-03Corporate:Senior Leadership
14Business Development:Recruitment Events6001-046001-046001-046001-04Corporate:Other (Please Comment)
15Business Development:Travel to New Markets6001-026001-026001-026001-02Medical Clinics:Austin
16Cost of Goods Sold:Management Expense5005500550055005Medical Clinics:Brentwood
17Cost of Goods Sold:Medical Supplies5020502050205020Medical Clinics:Rollingwood
18Cost of Goods Sold:Medical Supplies & Product Shipping5010501050105010Medical Clinics:Round Rock
19Cost of Goods Sold:Provider Wages, Taxes, & Benefits:Provider Salaries & Wages:Provider Contractors5300-035300-035300-035300-03Medical Clinics:San Antonio
20Cost of Goods Sold:Retail Inventory5030503050305030Medical Clinics:San Francisco
21Credit Card PaymentMedical Clinics:Sugar Land
22Equipment1560156015601560Medical Clinics:West Hollywood
23Equipment:Bebe HoldingMedical Clinics:West Loop
24Facilities:Cleaning6152615261526152Medical Clinics:Other (Please Comment)
25Facilities:Common Area Maintenance & RE Tax Share6151615161516151Remote
26Facilities:Rent & Lease6140614061406140
27Facilities:Repairs & Maintenance6150615061506150
28Facilities:Telephone & Internet6201620162016201
29Facilities:Utilities6200620062006200
30General & Administrative:Education & Training:Continuing Medical Education6550-016550-016550-016550-01
31General & Administrative:Education & Training:Corporate Training6550-056550-056550-056550-05
32General & Administrative:Education & Training:Offsite Meetings6550-036550-036550-036550-03
33General & Administrative:Education & Training:Professional Development6550-046550-046550-046550-04
34General & Administrative:Meals & Entertainment6540654065406540
35General & Administrative:Meals & Entertainment:Charitable Contribution6540-206540-206540-206540-20
36General & Administrative:Meals & Entertainment:Employee Awards & Gifts6540-116540-116540-116540-11
37General & Administrative:Meals & Entertainment:Entertainment6540-026540-026540-026540-02
38General & Administrative:Meals & Entertainment:Gifts & Tips6540-106540-106540-106540-10
39General & Administrative:Meals & Entertainment:Holiday Events6540-036540-036540-036540-03
40General & Administrative:Meals & Entertainment:Meals6540-016540-016540-016540-01
41General & Administrative:Meals & Entertainment:Other Meals & Entertainment6540-996540-996540-996540-99
42General & Administrative:Meals & Entertainment:Team Building Meals6540-046540-046540-046540-04
43General & Administrative:Professional Service:Bank Charges & Fees6520-066520-066520-066520-06
44General & Administrative:Professional Service:Billing & Collections6520-036520-036520-036520-03
45General & Administrative:Professional Service:Consulting6520-096520-096520-096520-09
46General & Administrative:Professional Service:Credit Card Fees6520-076520-076520-076520-07
47General & Administrative:Professional Service:Legal Fees6520-016520-016520-016520-01
48General & Administrative:Professional Service:Other Professional Services6520-996520-996520-996520-99
49General & Administrative:Recruiting:Other Recruiting6560-996560-996560-996560-99
50General & Administrative:Recruiting:Recruiting Ads6560-016560-016560-016560-01
51General & Administrative:Recruiting:Recruiting Travel6560-026560-026560-026560-02
52General & Administrative:Taxes & Reports:Annual Reports & Filings6570-016570-016570-016570-01
53General & Administrative:Travel:Auto Related Expenses6510-016510-016510-016510-01
54General & Administrative:Travel:Flights/Trains6510-046510-046510-046510-04
55General & Administrative:Travel:Hotel/Lodging6510-056510-056510-056510-05
56General & Administrative:Travel:Other Travel6510-996510-996510-996510-99
57General & Administrative:Travel:Parking6510-066510-066510-066510-06
58General & Administrative:Travel:Ride Share6510-026510-026510-026510-02
59Income Taxes:Federal Income Tax7550-017550-017550-017550-01
60Income Taxes:Local Income Taxes7550-037550-037550-037550-03
61Income Taxes:State Income Tax7550-027550-027550-027550-02
62Interest Expense7500-027500-027500-027500-02
63Miscellaneous AR1081108110811081
64Operating:Covid Testing6400640064006400
65Operating:Dues and Subscriptions6413641364136413
66Operating:Office Supplies6411641164116411
67Operating:Postage & Shipping6412641264126412
68Operating:Printing6414641464146414
69Operating:Technology Expenses6430643064306430
70Operating:Technology Expenses:Expensed Tech Equipment6430-026430-026430-026430-02
71Operating:Technology Expenses:Internet Subscriptions6430-046430-046430-046430-04
72Operating:Technology Expenses:IT6430-016430-016430-016430-01
73Operating:Technology Expenses:Other Tech Expenses6430-996430-996430-996430-99
74Operating:Technology Expenses:Software as a Service6430-036430-036430-036430-03
75Prepaid Expenses1100110011001100
76Receivables - Purchase1040104010401040
77Revenue:Discounts/Refunds Given4500450045004500
78Revenue:Other Revenue:Retail Sales4020402040204020
79Suspense Transaction (Please Comment)
80Taxes & Licenses (Please Comment)
81Uncategorized Asset1050105010501050
82Uncategorized Expense6190619061906190
83Wages, Taxes, & Benefits:Benefits6320632063206320
84Wages, Taxes, & Benefits:Benefits:Other Benefits6320-996320-996320-996320-99
85Wages, Taxes, & Benefits:Salaries & Wages:Contractors6300-046300-046300-046300-04
Category VLookup



File name correction: "Chase - CC Activity - 07.01.23 - 07.31.23 v2 (TEST).xlsm"


Script correction to column "M":

Public Sub Split_By_Card_Number_to_New_Workbooks()

Dim saveInFolder As String
Dim splitSheet As Worksheet
Dim cardNoDict As Object
Dim cardNoCell As Range
Dim cardNos As Variant, m As Long

saveInFolder = Environ("USERPROFILE") & "\Downloads\"

Set splitSheet = ThisWorkbook.Worksheets("Current Month Expenses")

'Create dictionary of unique card numbers in column M

Set cardNoDict = CreateObject("Scripting.Dictionary")
With splitSheet
For Each cardNoCell In .Range("M2", .Cells(.Rows.Count, "M").End(xlUp))
cardNoDict(cardNoCell.Value) = 1
Next
End With

Application.ScreenUpdating = False

'Loop through each unique card number

cardNos = cardNoDict.Keys
For m = LBound(cardNos) To UBound(cardNos)
'Copy sheet, creating a new workbook and save it with this card number in file name
splitSheet.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs saveInFolder & Left(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1) & " - " & cardNos(m) & ".xlsx", xlOpenXMLWorkbook
Application.DisplayAlerts = True

With ActiveWorkbook.Worksheets(1).UsedRange
'Copy and paste as values to remove formulas and links to original workbook
.Cells.Copy
.Cells.PasteSpecial xlPasteValues
.Cells(1).Select
Application.CutCopyMode = False

'Autofilter on column M for rows NOT equal to this card number and delete visible rows
.AutoFilter Field:=13, Criteria1:="<>" & cardNos(m) & "*", Operator:=xlFilterValues 'Note - without "*" filter doesn't work
.Offset(1).EntireRow.Delete
.AutoFilter
End With
ActiveWorkbook.Close True
Next

Application.ScreenUpdating = True

MsgBox "Created new workbooks in " & saveInFolder, vbInformation

End Sub
 
Upvote 0
2. Bring a second tab with it named "Category VLookup"
3. So my drop-down's in columns "I" and "J" (eye and jay) will still pull from "Category VLookup"
Simply replace:
VBA Code:
        'Copy sheet, creating a new workbook and save it with this card number in file name
        splitSheet.Copy

with:
VBA Code:
        'Copy 2 sheets, creating a new workbook and save it with this card number in file name
        Worksheets(Array(splitSheet.Name, "Category VLookup")).Copy
PS please use VBA code tags - the VBA icon in the message editor.
 
Upvote 0
Simply replace:
VBA Code:
        'Copy sheet, creating a new workbook and save it with this card number in file name
        splitSheet.Copy

with:
VBA Code:
        'Copy 2 sheets, creating a new workbook and save it with this card number in file name
        Worksheets(Array(splitSheet.Name, "Category VLookup")).Copy
PS please use VBA code tags - the VBA icon in the message editor.


You are my hero. My absolute HERO. I'm so excited about this I could cry. Thank you for helping me so, so much!!! You made this easy for someone like me who can do computer/software stuff but definitely isn't technically inclined on your level. I truly appreciate your help!!

PS - I added "vba" and "vba code" to the tags at the top, too. :)
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top