VBA - Macro for making banking file quicker to work with

JRAMZ88

New Member
Joined
Jun 7, 2017
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hi everyone - First off, I want to say thank you all for being such great resources - I have received a lot of help from some of you on here!
I'm hoping someone can help me with this particular request.

I have a file with daily banking activity that I download every day.
The report has tons of "garbage" that I don't necessarily need. So I'm hoping someone can assist me with this VBA code to help me streamline and be more efficient in the workplace.

Here's what I need the macro to do:

-select entire worksheet and unmerge all cells (file comes merged from the bank)
-then, I need to delete columns A, B, C, F, G, J and K (these are all garbage fields)
-then, once the above mentioned columns are gone, I need to insert 2 new columns in between columns A and B.
  • the first column, which will now be B will contain the number 40
  • the second new column will now be C will contain a concatenate formula to concatenate columns A and C starting in cell C7.
-lastly, once all of this is complete, I need to filter column E by Card Type in alphabetical order... the headings are listed on row 6.


I understand this is a lot to ask for, and it makes it hard to visualize - I have included a sample screenshot with dummy data to show what the end result would be that I'm looking for.




Any help or guidance would be much appreciated!!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
.
If I understand your goal ...

Code:
Sub noMerge()   '<--- unmerge all cells
    With Range("A1:Z50")
       .UnMerge
    End With
End Sub


Sub DelColumns()     '<--- delete columns


  Range("A:C,F:G,J:K").Delete


End Sub


Sub sbInsertingColumns()     '<----- -then, once the above mentioned columns are gone,
                             'I need to insert 2 new columns in between columns A and B.
    
    Range("B:C").EntireColumn.Insert
End Sub


Sub Insert40()     '<----- the first column, which will now be B will contain the number 40
    Range("B1:B50").Value = 40
End Sub


Sub ConcAnC()


End Sub


Sub ItemSort()     '<---  filter column E by Card Type in alphabetical order.
Dim rng As Range
Set rng = Range("H1:H50" & Cells(Rows.Count, 1).End(xlUp).Row)


rng.Sort Key1:=Range("H1"), Order1:=xlAscending, Header:=xlNo


End Sub

The only part not included in the Concatenate macro.

Cheers
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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