Insert a table on the next available row after a macro has run

Wayne Rogers

New Member
Joined
Aug 5, 2014
Messages
17
Hello,

I have a spreadsheet that imports data from a HTMl file and tidys up the data via a macro, this data then needs manual inputs (reason codes) into a column. I have a command button than sorts the data by the manually inputted reason codes.

I would like to know if there is a code that could enter a simple table on the next available so i could summarise the data. I tried to do it by adding an extra tab with the table on it (tab could be hidden) and use a simple copy and paste macro (which works) but it pastes it to a specified cell and this wouldn't work as everytime i use the sheet there are a varying amount of rows.


Ideally it would be good to have the code connected to the original command button but i can add another button. I'm sure it can be done but my limited knowledge is showing on this one.

Many thanks in advance.

Wayne
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Just in case anyone looks at this, I've kind of solved it after several hours of head banging. My code is as below if its any use to anyone

ActiveSheet.Range("b5").End(xlDown).Offset(1, 0).Select
Sheets("Sheet1").Select
Range("A1:E9").Select
Selection.Copy
Sheets("BWO").Select
ActiveSheet.Paste
 
Upvote 0

Forum statistics

Threads
1,215,390
Messages
6,124,667
Members
449,178
Latest member
Emilou

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