Dublicate row based on value in column "C" and paste to bottom, changing date and divide amount, delete original row

Status
Not open for further replies.

Konigsfeldt

New Member
Joined
Jun 17, 2020
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have rows with budget amounts that are totals for a year, but want to split them into 4 rows in same sheet, changing the date from 01-01-20XX to 01-01, 01-04, 01-07 & 01-10 and furthermore divide the amount with 4. (So I can compare with actuals by quarter when pivoting)

The variable is in column "C", and says "Budget", which determines whether it should be quartered or not. Column "C" contains other values as well, such as "Actual" and "Opening post", and those should be skipped - but all budget rows should be quartered and pasted to the bottom (or anywhere in the dataset, as long as the entire dataset can be marked with crtl+shift+down). The sheet is called "Rawdata", and lastrow is column "AB".

The code should do the following (example with first budget row):

1593164291616.png


to:
1593678976276.png


Hope it makes sense!

Thanks for any help on this.

/Jacob
 

Attachments

  • 1593678472624.png
    1593678472624.png
    17.9 KB · Views: 0
  • 1593678486962.png
    1593678486962.png
    17.9 KB · Views: 1
  • 1593678493201.png
    1593678493201.png
    17.9 KB · Views: 1
  • 1593678569190.png
    1593678569190.png
    29.5 KB · Views: 1

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Status
Not open for further replies.

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

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