Is there a way to delete highlighted columns?
I'd like to run a macro/excel function that deletes columns that are highlighted. Is there an easy function do this? We need to populate duplicate fields for internal procedure but need to remove the duplicates for external parties
Since you have an entire column highlighted in yellow, this will just check to see if the cell in row 1 is yellow. If so, it'll delete the column. Sub deleteYellowColumns() Dim lastCol As Long, i As Long Dim ws as Worksheet Set ws = Sheets("Sheet1") ' Change this as necessary lastCol = ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column For i = lastCol To 1 Step -1 If ws.Cells(1, i).Interior.Color = 65535 Then ws.Cells(1, i).EntireColumn.Delete Next i End Sub
Writing excel functions in vba
I need to be able to select columns in Excel by specifying column numbers in vba
How to update a specific row of a table in Excel using Microsoft Graph?
columns' values based on specific rows in pivot table excel
VBA Adding cells from one sheet to another by cell
Searchng a sheet for a value and returning row & column numbers
How to take a control of specific cell of XL?
Vlookup exact text on a cell text string
HTTP GET responds with empty body, downloads excel document in IE
VBA replace comma with line break in word?
Excel online sharing
Change cell value based off of selection from ListBox
How to remove hidden quotes
Sorting out data by insert and copy and paste special
Excel VB to create monthly table based on user input
Week number from Date format in excel(Monthwise_Week Number)