VBA macro to create new worksheet from existing worksheet

YuthKu

New Member
Joined
Apr 26, 2015
Messages
7
Hi, I need to create a new worksheet and call it 'PRICE' from the worksheet 'SETP 3' that I have,
And I need columns A, B, C, E, F, M, N of worksheet 'SEPT 3' to be the columns A, B, C, D, E, F, G in the new worksheet 'PRICE'

Could anyone please help write this macro for me.

Many thanks in advance

VKu
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi,

Try this


Code:
Sub make_Copy()
Dim ws As Worksheet
On Error Resume Next
Set ws = Sheets("PRICE")
On Error GoTo 0
If ws Is Nothing Then
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "Price"
Sheets("SETP 3").Range("A:A,B:B,C:C,E:E,F:F,M:M,N:N").Copy Range("A1")
Else
ws.Cells.ClearContents
Sheets("SETP 3").Range("A:A,B:B,C:C,E:E,F:F,M:M,N:N").Copy Sheets("PRICE").Range("A1")
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,377
Messages
6,130,265
Members
449,569
Latest member
sukming

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