PDA

View Full Version : Split the Workbook into different files based on SPECIFIC DATA VALUES



SBK88
04-21-2016, 04:17 AM
Dear All,

Need your help urgently, as I am totally new to VBA.
I have an excel file like


Country Name

Country Code

Data Level

2016 Jan

2016 Feb

2016 Mar

2015 Jan

2015 Feb

2015 Mar

2014 Jan



Australia

AU

01

224.12

56234

34

345

567

7865

34



China

CH

10

34

56

567

456

456

56

6543



Indonesia

ID

04

3456

67

823

467

8

67856

7



Malaysia

MY

05

567

6

7856

76

786

786

78












Requirement is like -
I need to split this file into sub files like File1 - 2016, File 2 - 2015, File 3 - 2014, with country name, country code and data level columns common in all the new files created.
I need VBA code to perform the following task.

let me be more clear
these are Text data (2016 Jan, 2016 Feb ......)

these column fields are like - 2016 Jan, 2016 Feb, 2015 Jan, 2014 Jan etc.
New Generated File Name required like - 2016 ( which should contain the data for 2016 Jan, 2016 Feb ..... 2016 Dec, similarly for 2015 will contain the data for 2015 Jan .... 2015 Dec and so on)

Thanks in advance