+ Reply to Thread
Results 1 to 4 of 4

Splitting of data based on condition

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Splitting of data based on condition

    Dear Expert,

    I have 2 columns and few hundred thousand row of data. My first column has got the time and my second column has values. I have to split the data based on different timings that I have noted manually.

    Eg)

    Field1 Field2
    4 0.05484
    8 0.04985
    12 0.04985
    16 0.05484
    20 0.04985
    24 0.04985

    I want to save data, based on the conditions say 12-20, 40-60, 1000-1020 onto 3 separate text file.

    Thanks
    Arun
    Last edited by arurun; 04-23-2012 at 04:14 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Splitting of data based on condition

    Add a helper column, C, that determines the band. with a formula such as

    =IF(A2<12,"0-11",IF(A2<21,"12-20",...

    and then pivot the data.

  3. #3
    Registered User
    Join Date
    04-23-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Splitting of data based on condition

    Thank u.
    But, I want an automated way through which I can save the data to text files.
    Say, I give my condition to 12- 20, I want
    12 0.04985
    16 0.05484
    20 0.04985
    to be saved as a txt file
    and I will be giving multiple conditions and everything has to be saved as separate text files

    Thanks
    Arun

  4. #4
    Registered User
    Join Date
    04-23-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Splitting of data based on condition

    To give more clarity, I am attaching my excel file (sample.xlsx). I have to split different segments(based on the first column values noted manually) and save each as a separate text file.
    Thanks
    Arun
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1