create new tab taking data from one column

sbrown64

Board Regular
Joined
Aug 23, 2019
Messages
87
Hi
I have a spreadsheet which has many tabs at the bottom for different companies. Sheet1 is the master where all info is recorded on a daily basis, I run the macro and it copies the data to the relevant company tab, all that is ok.
Now I have been asked that a new page is created with just the contents of one column selected. So for instance column G needs to be selected from the master sheet and a new sheet created called MS,Aldi Separation and any entries that have figures to be copied to a new sheet. The list below was done manually by copy and paste from the master sheet to a new sheet added called MSaldi separation
No.Invoice
Date
Company MSAldi Separation
6.0Year to 30th June 2015
*30/06/2014Forty Shillings 11,026.33
6.425/07/201440 Shillings 3,567.50
TOTAL 14,593.83 14,593.83
5.0Year to 30th June 2014
5.928/02/2014Bidwells 1,665.48
5.1231/03/2014Bidwells 1,798.40
5.1430/04/2014Bidwells 2,480.25
5.1631/05/2014Bidwells 7,762.62
5.1811/06/2014Bidwells 7,200.00
5.2130/06/2014Bidwells 8,173.20
6.0Year to 30th June 2015
6.531/07/2014Bidwells 4,158.45
6.2231/01/2015Bidwells 585.00
8.0Year to 30th June 2017
8.1428/02/2017Bidwells 9,899.00
8.2330/04/2017Bidwells 3,725.00
8.2531/05/2017Bidwells 3,641.91
8.3130/06/2017Bidwells 1,493.43
9.0Year to 30th June 2018
9.531/08/2017Bidwells 575.00
9.631/07/2017Bidwells 870.00
9.1030/09/2017Bidwells 533.50
9.0Year to 30th June 2018
9.2730/11/2017Bidwells 350.00
9.3831/01/2018Bidwells 1,647.00
9.0Year to 30th June 2018
9.4628/02/2018Bidwells 1,192.00
9.4731/03/2018Bidwells 1,416.00
10.00Year to 30th June 2019
10.6031/10/2018Bidwells 200.00
TOTAL 59,366.24

<tbody>
</tbody>
I hope I have made my self clear, I look forward to receiving some help.
Regards
Stephen
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hello,

Not totally clear, but lets try this to start with

Code:
Sub CREATE_NEW_TAB()
    Sheets.Add
    ActiveSheet.Name = "MS ALDI SEPARATION"
    MY_DEST = ActiveSheet.Name
    Sheets("MASTER").Select
    Range("G2:G" & Range("G" & Rows.Count).End(xlUp).Row).SpecialCells(xlConstants).Copy
    Sheets(MY_DEST).Range("A1").PasteSpecial (xlPasteValues)
End Sub

post back with any issues/problems.
 
Upvote 0
Hi

I tried the code and it created a new sheet, but all it copied across into column A was the figures, is there a way to copy the entire row, so it would show the entire line a bit like my example above?

Regards

Stephen
 
Upvote 0
Hello,

Not 100% clear, what column are you looking for that has data? Is it the first column (No.) or either of the others. I understand that if this column has data then the entire row needs to be copied.

Won't that just copy the entire table though?
 
Upvote 0
Hi

This is the link to the entire file

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]https://1drv.ms/x/s!Aq3WqOz73fYygYUVGCSdsQ9NJh76_w?e=NVvKQs

As you can see the new tab but only numbers in column A, in the Royston costs sheet (the input sheet) it is basically anything with an amount in column G and ideally then list them in name order with a subtotal. The example i provided above was a manually created one with entries copied and pasted as when required.

Regards

Stephen
[/FONT]
 
Upvote 0
I have tried creating a pivot table for the master sheet and when I try to select the ms/aldi column this is what happens, but it is showing the blanks. how do i get rid of them showing?

[TABLE="width: 464"]
<tbody>[TR]
[TD]Row Labels[/TD]
[TD]Sum of M&S/Aldi/Retail[/TD]
[TD]Sum of Total[/TD]
[/TR]
[TR]
[TD]June 30 2018[/TD]
[TD="align: right"]$2,278,809.34[/TD]
[TD="align: right"]$4,266,749.10[/TD]
[/TR]
[TR]
[TD]Anglian Water[/TD]
[TD][/TD]
[TD="align: right"]$4,782.58[/TD]
[/TR]
[TR]
[TD]Bidwells[/TD]
[TD="align: right"]$6,583.50[/TD]
[TD="align: right"]$18,788.25[/TD]
[/TR]
[TR]
[TD]BLP Insurance[/TD]
[TD="align: right"]$5,000.00[/TD]
[TD="align: right"]$5,000.00[/TD]
[/TR]
[TR]
[TD]Breheny[/TD]
[TD="align: right"]$1,837,112.10[/TD]
[TD="align: right"]$3,282,004.70[/TD]
[/TR]
[TR]
[TD]Cannon[/TD]
[TD][/TD]
[TD="align: right"]$1,698.75[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,276
Messages
6,171,138
Members
452,381
Latest member
Nova88

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