Langsung ke konten utama

Sorting Data With Excel

It's 2:27 AM now. Got my graveyard shift now. And boss gave me a task. It looks simple yet it's very frustrating since i have to deal with crazy disorganized arrays of data. For example, the first row is a data at 2 Sept 2008 08:02:00 AM. But the next row is data at 1 Sept 2008 23:10:26 PM, then continue with 2 Sept 2008 00:10:27 AM. See the image



By the way, im dealing with sea level height data, sent by tsunami buoy. And in this post, i will use example of three data row. You can apply it for thousands of data (as long as the data fit in excel, cause excel limited the number of data row to 65000 or so). As you can see, the date, hour, minute and second placed separatelly. This is an advantage (at least for me, hehe). Here's the idea. I want to combine the date, hour etc. into a single cell. What im doing here is write this formula:



I multiply the minute with 100, hour with 10000 and date with 1000000 and then add them all (with second too), in a single cell. Then copy it to other rows. What does this step for? It's to give the ID to the each of time parameters, so there will be no same ID for each of time parameters.
This ID is very important for the further steps. Copy the ID column, Paste Special(Values) it on the left of all data. We give the name 'ID' to make it looks simple.



Now, copy the 'ID' column to another sheet. And then, sort them ascending or descending, depend to your liking. I prefer ascending. Now, we use VLOOKUP formula. This is how it works. The table that we placed sorted ID is Table 2, and the original one named Table 1. VLOOKUP searches for a ID value in the Table 2, and then searches the same ID value in the Table 1. If it finds a same value, we can 'catch' the data from that row. If you confuse with the explanation (not a good explanator through, hehe) let's get down to the practical use. In the Table 2, place a formula like this:



I will explain each of the parameter. The first value (A2), is the ID, the value that we will looking for in Table 1.
The second one (Sheet2!$A$2:$H$1370) is the Table 1. I have my Table 1 at Sheet2, the rows of the table is 1369 (from 2 to 1370) and the column from A to H. We placed $, so the table selection will stay in that position if we copy-paste the VLOOKUP formula to another row.
Third parameter is '8', which is the number of the column that we want to 'catch' the data. Look at the previous pic. The 'height' data is in the 8th column. If you want to take the 'hour', you can replaced it with '5'.
And at last, the last parameter is 'FALSE', it means that if the ID value from Table 2 didn't match with the Table 1, it will finds the closest value. You can see Microsoft Excel Help for more information about VLOOKUP.
Once you get the formula right, just copy and paste it to another rows. That's it from me. Hope this trick is helpful. Cheers

Komentar

Anonim mengatakan…
wawawa
ka dito rekues turorial MATLAB euy,,
salam2 buat mamah di rumah
(jiga rikues di radio wae..hahah)
for beginer nya hahahaha

Postingan populer dari blog ini

My First Post

Hellow...this is my first posting...euu..don't know what to say, hehe I'm glad because finally i made myself a blog... I will share some of my knowledge or interesting (at least for me) here and need feedback from you, so don't hesitate to suggest, critic, mock or stuff like that, haha. And if you wish you can read about my daily life or about 'my feeling this day' wall of text or my love story, which is like diary book, like everybody does, then you just hoping for a fat lady sings. You won't find it in here. Maybe i'm gonna make it in another blog, maybe, hehe, not kind of person who wrote a diary everyday. So, don't bother searching my private stuff here, you will find NOTHING!!!!! Until then, C U in my next post. Bye.......

Chords You Can Use

Consider you want to make a song. And let's just say, the root note is in C (the most common root note ever!!) and we're gonna use major scale. And then, the next question is, what chords i can use to make this song? Okay, im here to save you, dont worry, hehe. In this post, i will give you the idea, what chords you can use and why you can use them. And what im gonna give you here, is a basic music theory. Hopefully it's enough for you to make some song. Maybe you will encounter some song that out of this rule, but hey...music is not mathematics. You can break the rules, if it's good for you and/or your listeners. But of course if you a complete beginner, it's just save to follow the rules first. Without further sayings, let's begin, shall we? We continue with the scenario, which is make a song in C major. As we all know, a C major scale is C D E F G A B. There's common rule, that we can use pattern (Major-Minor-Minor-Major-Major-Minor-Diminished) over a maj