Insert Column with Header and fill down quarter

Serafin54

Board Regular
Joined
Apr 11, 2014
Messages
155
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

Trying to streamline and rather than
  1. selecting the data column
  2. inserting a new column to the left
  3. Adding Time Period header
  4. entering in ="Check Date - Qtr "&ROUNDUP(MONTH(RC1)/3,0)
  5. filling down
  6. saving as values
I am looking to see how to do this via VBA. Issue is, the date could be in column B on this report, D on another. It depends on who is submitting it and sometimes the rows of data could be 500+ per file received.
I don't have a lot of vba knowledge and am trying to learn but to be honest, haven't got past

Sub Quarter_from_date()

Selection.Insert Shift:=xlToLeft
ActiveCell.FormulaR1C1 = "Time Period"


Appreciate any direction.
 

Attachments

  • Capture.JPG
    Capture.JPG
    38.9 KB · Views: 4

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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