Do Until Copy and Paste Multiple Cells

JSAUS

New Member
Joined
Jun 11, 2020
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
Hello all.
Long time lurker, first time poster.
I need help extracting data from a software based Excel export - it's not pretty.
Essentially, we export a budget from our software but need it in a different format to upload into a different system.

I can do some of this code already, but would like a nice tidy macro from start to finish.

1. Create 2 additional worksheets; one called Section1 the other called Section2. Have 4 columns in these sheets named: Code1/Code2/Qty/Amount
2. In original sheet split column G (by the space delimiter) into Code1 and Code2 columns.
Here's the kicker:
3. Copy columns/range H/I/L/N UNTIL column B says "Subtotal - Section 1" so in this case, the range would be "H3:I9, L3:L9, N3:N9" (if it's easier, happy to do one big range H3:N9 and delete out the irrelevant columns once pasted). The number of rows in the budget will change depending on the job (eg. the next one I do the subtotal may be in row 50). Paste into Section1 sheet.
4. Copy Subtotal - Section 1 amount (this example $15,000) into Section1 sheet under the Amount Column (under the costs) and populate the Code1 (value: 1000), Code2 (value: 12000), Qty (value: 1) in that row.
5. In Section1 sheet delete out any rows that don't have a code

Extracting Section2 Budget:
Same as steps 3 - 5 above, except I only want the Costs/Revenue from the Section2 information.

I have been trying to do this for days, so any assistance would be greatly appreciated! I don't know how to link the file, but below is a screen shot.
TIA!

MrExcel Image.jpg
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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