+ Reply to Thread
Results 1 to 4 of 4

Ordering and filling Missing values in Excel 2010

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    China
    MS-Off Ver
    Excel 2010
    Posts
    19

    Ordering and filling Missing values in Excel 2010

    Dear all,
    I am currently facing a problem with a large dataset. Attached with this post is a sample excel file, where data for certain countries is presented. As can be seen from the first 4 columns, some year are missing from the dataset. I want to re organize the data and fill the missing values, any ideas how to do it. Manually is one option, but the real dataset that I am working on has more than 2,650,841 rows of data, hence is almost impossible for me to do. Any help would be highly appreciated. Thanks

    Yasir
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Ordering and filling Missing values in Excel 2010

    Hello and welcome to the forum,

    In P2 put this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    entered as Ctrl + Shift + Enter not just enter

    In your real workbook change the arrays but keep the Dollar signs in place.

    Good luck.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    China
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Ordering and filling Missing values in Excel 2010

    Dear abousetta,
    Thank you very much for the prompt reply. However, I am still facing the same problem. I have four columns, Importer, Exporter, Year and Import. The data is taken for the time period 1962 - 2011 for every country. Now I have 192 countries, and for each year every country has import data with 191 countries. e.g.

    US CAN 1962 US $ ....
    US CAN 1963 US $ ....
    US CAN 1964 US $ ....
    US CAN 1965 US $ ....
    US CAN 1966 US $ ....
    US CAN 1967 US $ ....
    US CAN 1968 US $ ....
    US CAN 1969 US $ ....
    .
    .
    .
    .
    .
    US CAN 2011 US $ ....
    UK CAN 1962 US $ ....
    UK CAN 1963 US $ ....
    UK CAN 1964 US $ ....
    UK CAN 1965 US $ ....
    .
    .
    .
    UK CAN 2011 US $ ....
    CAN US 1962 US $ ....
    CAN US 1963 US $ ....
    CAN US 1964 US $ ....
    CAN US 1965 US $ ....
    .
    .
    CAN US 2011 US $ ....


    and so on and so forth. Now the problem here is that I need n*n*t observations, (n is the number of countries and t is time period). But some countries have missing data in them, missing in the sense that they didn't report. For example, Bangladesh didn't exist until 1971, so Bangladesh's data starts from 1972. Similarly, Belgium didn't exist seperately till I dont know the end of 1990's I think. So these countries have data starting not from 1962 but like I said I need exactly n*n*t observations, which can be dealt with putting zeros in the missing years. But I dont know how to do this. You provided me a formula to match observations, but in the real dataset that I have (its really large 30 MB, i tried to upload it with this post but in vain) a dataset where when I tried to put this formula it gives me wrong solution (some countries which have data in 1962 give 0). Its like the Stata's fillin command which fills in the missing values and bring the dataset in n*n*t format where every country has the same number of observations, with 191 countries for 49 years (1962 - 2011). I hope I made myself clear this time and sorry for the long post. Thanks


    Yasir

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Ordering and filling Missing values in Excel 2010

    Hi Yasir,

    The formula I provided creates a unique identifier from the four columns then it matches them to your data. If it does not find a match then it gives a #NA error. The error handler then converts this to a zero.

    If you can, zip the file and upload. If not then PM me and I will give you an email to send to so I look at your original data.

    abousetta

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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