Split sheets by value

Claire9079

New Member
Joined
Jun 3, 2019
Messages
6
Office Version
  1. 2007
Platform
  1. Windows
Hi

thanks for your time in advance.

I know in excel i can split worksheet into multiple worksheets based on column value.

However my report size is quite big and i only need one criteria, can i split into sheets based on values?

For example, i would need a macro to split the below data just based on Japan.


Date Namestart dateend dateLocation
03/06/2019 CCC CC03/06/201903/06/2019Japan
03/06/2019 CCC CC03/06/201903/06/2019US
03/06/2019 CCC CC03/06/201903/06/2019UK

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>


thanks
Claire
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try this

Code:
Sub Split_sheets_by_value()
    Dim sh As Worksheet
    Set sh = ActiveSheet
    sh.Range("A1").AutoFilter 5, "Japan"
    Sheets.Add
    sh.AutoFilter.Range.EntireRow.Copy Range("A1")
    sh.ShowAllData
End Sub
 
Upvote 0
It works!! Thanks so much DanteAmor :LOL:

Try this

Code:
Sub Split_sheets_by_value()
    Dim sh As Worksheet
    Set sh = ActiveSheet
    sh.Range("A1").AutoFilter 5, "Japan"
    Sheets.Add
    sh.AutoFilter.Range.EntireRow.Copy Range("A1")
    sh.ShowAllData
End Sub
 
Upvote 0
Youre welcome and thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,753
Messages
6,126,677
Members
449,327
Latest member
John4520

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