spsquirrel
New Member
- Joined
- Aug 2, 2019
- Messages
- 3
Below is the beginning of my code, the only issue I'm having is that the below list when deleting should only delete on an exact match.
So for example if I have 'carrier name' as a column header and 'carrier name 2' as a column header by the list below only carrier name column should be deleted and carrier name 2 should remain.
Currently the code is deleting both columns.
how do I make this exact match?
Dim rngFound As Range
Dim rngDel As Range
Dim arrColumnNames() As Variant
Dim varName As Variant
Dim strFirst As String
So for example if I have 'carrier name' as a column header and 'carrier name 2' as a column header by the list below only carrier name column should be deleted and carrier name 2 should remain.
Currently the code is deleting both columns.
how do I make this exact match?
Code:
Dim rngDel As Range
Dim arrColumnNames() As Variant
Dim varName As Variant
Dim strFirst As String
Code:
'list of column headers to delete
arrColumnNames = Array("Anticipated Billing Date Year/Period", "Carrier Name", "Customer Classification", _
"Customer Classification Description", "Customer Group", "Customer Hierarchy 1", "Customer Hierarchy 2", _
"Customer Material", "Customer PO Date", "Document Currency", "Fixed Conversion Cost at Standard (USD)", _
"Freight Expense (USD)", "Freight on Order", "Global Region", "Internal Material Description", _
"Material Cost at Standard (USD)", "Net Order Value", "Order Commission Value (USD)", "Order Gross Margin Value (USD)", _
"Order Reason", "Order Reason Description", "Order Rebate Value (USD)", "Payer", "Payer Country", "Payer Name", "Payment Term", _
"PPV (USD)", "Product Base", "Product Base Desc.", "Product Class", "Product Class Desc.", "Product Group", "Product Sub-Group", _
"Product Sub-Group Desc.", "Profit Center", "Purchase Order Document", "Reval (USD)", "Sales Group", "Sales Office", _
"Scheduled Ship Week", "Ship to", "Ship to Postal Code", "Ship to Region", "Shipping Condition", "Sold to City", "Sold to Country", _
"Sold to Region", "Variable Conversion Cost at Standard (USD)", "VAT Tax Code", "VAT Value (USD)")