Monday, March 31, 2014

Excel - How to VLOOKUP with Multiple Criteria Using INDEX and MATCH

VLOOKUP is a great tool for pulling data from tables, but it has a handicap: it can only work with one criteria for matching information. If there are multiple rows in your sheet with the same information, you’ll only get the first one. If you need to use two or more conditions to match a specific piece of data, you’re out of luck. Fortunately, Excel has a pair of functions called INDEXand MATCH that can help produce the same results as VLOOKUP with multiple criteria. Here’s a quick tutorial to help you learn how…

Example Data

Let’s say, for example, that we want to be able to search through a list of fuel economy data for cars to find the mileage…
Car Data
Normally, we would want to be able to enter the model of a car and get it’s fuel economy as a result. Unfortunately, Many cars, like the Acura ILX, have multiple engine configurations with different mileage ratings. Fortunately, in this case, the car’s displacement can serve to separate them.
Displacement Highlight
This means, however, that we will need to look up the car by both its Model and its Displacement at the same time to find the appropriate Combined Fuel Economy in column H.

Trying to Use VLOOKUP

In a normal VLOOKUP, the syntax is as follows:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
The lookup_value is the data you are searching with.
The table_array defines the table that you want to look through. The first column must be the column that has the lookup_value in it.
The col_index_num is the number of the column in the table_array that has the data you want to find.
The optional range_lookup specifies whether the list is sorted or not. (TRUE means that VLOOKUP stops looking when it finds something that comes later in the alphabet than the lookup_valueFALSE means it searches the entire list.)
If we were looking for just the Model of car using VLOOKUP in our example data, it would look like this:
VLOOKUP Example
=VLOOKUP(A2,C4:H1159,6,FALSE)
A2 holds the Model of car we want to find.
C4:H1159 is the table we want to search through. Column C is the column with the Model information.
Column 6 is the column that holds the Combined Fuel Economy figure that we want to find.
The result of the VLOOKUP is this:
VLOOKUP Result
It finds the first entry that matches – the 1.5 liter engine with 38 MPG. This is a problem if, for example, you want to find the fuel economy of the 2.4 liter sport version. To do that, we need to use INDEX and MATCH.

Using INDEX and MATCH to Replace VLOOKUP

What we really need is to be able to look up the Model and the Displacement at the same time. MATCH is a function that gives you the location of an item in an array. The syntax for MATCH is as follows:
=MATCH(lookup_value, lookup_array, [match_type])
The lookup_value is what you are searching for.
The lookup_array is the array of values you are trying to find the lookup_value in.
The optional match_type determines whether MATCH must find the lookup_value exactly (with a 0), or return the closest match that comes before it (with a 1) or after it (with a -1) alphanumerically.
The INDEX function takes a location and returns the value that is in the cell. The syntax for INDEX is as follows:
=INDEX(array, row_num, [col_num])
The array is the table of data that contains the cell value you want.
The row_num is the relative row number of the cell you want.
The col_num is the relative column number of the cell you want.
By combining INDEX and MATCH we can produce the same result as VLOOKUP. Using the same search we did forVLOOKUP, the INDEX/MATCH pair looks like this:
INDEX MATCH Example
=INDEX(C4:H1159,MATCH(A2,C4:C1159,0),6)
C4:H1159 is the array that INDEX uses to find the value.
A2 is the cell that the value we want MATCH to find.
C4:C1159 is the lookup_array that MATCH looks through to find the value in A2.
The 0 means that MATCH will look for the exact value instead of an approximate one.
Column 6 is the column in the C4:H1159 array that holds the Combined Fuel Economy values.
The result is identical to the VLOOKUP result. MATCH finds the first Combined Fuel Economy value for the Acura ILX, which means it will give 38 MPG for the 1.5 instead of one of the other engine options. To find a specific Modeland engine Displacement combination, we need to modify our INDEX/MATCH formula into an array formula.

Using INDEX and MATCH with Two Criteria

To allow MATCH to search for multiple criteria, we are going to change the way it looks for its result by making it an array formula.An array formula takes an array of values instead of a single one and checks each cell in the array until it finds a result.
Our old MATCH formula looked like this:
=MATCH(A2,C4:C1159,0)
It looked for the value of A2 in the table C4:C1159, and when it found it, it returned the location.
Now we are going to ask it to be creative:
=MATCH(1,(C4:C1159=A2)*(D4:D1159=B2),0)
We have asked MATCH to look for a value of 1. Instead of giving it an existing array to look through, we are asking it to build one from scratch. The new array checks all the values in C4:C1159 for one that matches A2 and all the values in D4:D1159 for one that matches B2. Where they both match, the array will have a 1 (a TRUE boolean result). Where they don’t both match, the array will have a 0 (a FALSE boolean result). Therefore, MATCH will return the location where the array matches 1 (when both of our criteria are true).
If this process doesn’t make sense to you, that’s okay. Just plug the new MATCH function into your INDEX/MATCHformula:
=INDEX(C4:H1159,MATCH(1,(C4:C1159=A2)*(D4:D1159=B2),0),6)
When you enter the formula, don’t just press ENTER. Press CTRL+SHIFT+ENTER to tell Excel that it is an array formula. You can tell you’ve done it right because the entered formula will be surrounded in curly braces {}.
Curly Braces
With that, your formula will be able to find the Combined Fuel Economy based on both the Model and the Displacement. You can use this technique for any number of criteria with INDEX and MATCH. Just add additional terms to the multiplication equation.

Multiple Criteria VLOOKUP with INDEX and MATCH Example Download

You can follow along with this tutorial using the original source data and explore an example of the solution in the embedded file below. To download your own copy, click on the green Excel icon in the lower right corner.

Wednesday, March 26, 2014

Cara membuat Strong Kangen (SK) yang "Matang" menurut Enagic.com

Cara membuat Strong Kangen (SK) yang "Matang" menurut Enagic.com :

1. Nyalakan air dengan besar pertama kali....

2. Lalu kecilkan debit air hingga si mesin bilang INCREASE FLOW

3. Lalu naikkan kembali PERLAHAN debit air hingga notifikasi increase flow nya hilang...

3. Jadi membuat SK cukup dengan "air kecil" saja...

4. Pastikan garam elektrolisis enhancer juga masih ada ya...

5. Air SK itu fisiknya rada berminyak (greasy)...

6. Menurut enagic.com juga, biar kan SK selama 72jam,sehingga "terFermentasi"...

7. Minyak terbaik tuk keperluan DEMO adalah minyak yang mengandung protein... Seperti minyak wijen

8. Saya selalu tes SK dan minyak sebelum saya jadikan SK tersebut sebagai alat demo saya... Pernah Gagal Demo juga soale :)

9. Sejatinya SK tidak boleh diminum, namun kesaksian di lapangan banyak yang minum dan memberikan dampak yang luar biasa terhadap kesehatannya... Terutama bagi yang ingin cepat kurus :)

10. Kalopun Anda "nekat", pastikan Anda sudah terbiasa minum yang pH 9,5... :)

11. Maksimal 1 hari minum SK 30ml aja ya... :)

Demikian sekilas info dari saya...

Change Your Water...
Change Your LIFE!!!

Mengenal Arti Kode Label Kemasan Plastik

Mengenal Arti Kode Label Kemasan Plastik

Arti kode label kemasan plastik sudah seharusnya kita kenal. Dengan mengenal kode dan label pada kemasan plastik kita dapat menggunakan kemasan plastik dengan tepat dan meminimalisir dampak negatif plastik pada kesehatan maupun dampak pada lingkungan.

Setiap kemasan plastik, seharusnya memiliki kode atau label yang tertera dengan jelas. Biasanya terletak di bagian bawah kemasan plastik.

Kode atau label pada kemasan plastik berbentuk gambar segitiga daur ulang (3 R) dengan angka di tengahnya. Kode dan label selengkapnya sebagai berikut:

PETE atau PET (polyethylene terephthalate); Kemasan plastik ini diberi label atau kode angka “1″ dalam segitiga. Kode ini biasa dipakai untuk botol plastik yang jernih, transparan, tembus pandang seperti botol air minuman kemasan, minyak goreng, selai peanutbutter, kecap, dan sambal.

Kemasan dengan kode ini direkomendasikan hanya untuk sekali pakai. Jangan dipakai untuk menyimpan air hangat apalagi panas. Bila terlalu sering dipakai, apalagi digunakan untuk menyimpan air hangat apalagi panas, akan mengakibatkan lapisan polimer pada botol tersebut akan meleleh dan mengeluarkan zat karsinogenik (dapat menyebabkan kanker) dalam jangka panjang.

HDPE (high density polyethylene); Plastik dengan label angka “2″ dalam segitiga. Kode ini biasa dipakai untuk botol susu yang berwarna putih susu, tupperware, galon air minum, kursi lipat, dan lain-lain.

HDPE merupakan salah satu bahan plastik yang aman untuk digunakan karena kemampuan untuk mencegah reaksi kimia antara kemasan plastik berbahan HDPE dengan makanan/minuman yang dikemasnya.

Kemasan berlabel HDPE direkomendasikan hanya untuk sekali pemakaian karena proses pelepasan senyawa antimoni trioksida akan terus meningkat seiring waktu.

V atau PVC (polyvinyl chloride); Kemasan plastik berlabel angka “3″ dalam segitiga. Plastik berbahan PVC (polyvinyl chloride)
merupakan plastik yang paling sulit didaur ulang.

Penjelajah Alam Semesta

Pada tahun 1990, Carl Sagan, seorang ilmuwan astrofika terkenal di abad 21, meminta satelit tanpa awak penjelajah ruang angkasa, Voyager 1, berbalik untuk mem-foto Bumi... jaraknya waktu itu "baru" 4 Milyar mil dari Bumi...

Ini adalah hasilnya....

Berikut adalah quotes dari Carl Sagan yang sangat terkenal:
"From this distant vantage point…
The earth, might not seem like of any particular interest….
But for us… Its different....
Consider again that dot..
THAT’S HERE.. THAT’S HOME.. THAT’S US..
On it,
Everyone you love, Everyone you know, Everyone you ever heard of…
Every human being who ever was...
Lived out their lives..
The every good or joy and suffering..
Thousands of continent, religions, ideologies and economic doctrines... Every hunter and forager..
Every hero and cower.. Every creator and destroyer of civilization... Every king and peasant..
Every young couple in love.. Every mother and father.. Hopeful child..
Inventor and Explorer..
Every teacher of morals.. Every corrupt politicians.. Every superstar.. Every supreme leader...
Every saint and sinner in the history of our species..
LIVED THERE...
On a motives dust.. Suspended in a sunbeam..
The earth… Is a very small stage..
In a vast cosmic arena..
Thick of rivers of blood.. Spilled by all those Generals and Emperors..
So let in glory and triumph they could become the momentarily masters….
Of a fraction-of-a-dot..."

Terjemahan kasarnya:
"Dari jarak yang sejauh ini...
Bumi, mungkin tidak terlihat begitu menarik....
Tapi bagi kita... Tentu tidak begitu....
Coba fikirkan lagi titik itu..
ITU DISINI.. ITU RUMAH KITA.. ITU KITA..
Disitu,
Semua orang yang kamu cintai, semua orang yang kamu tahu, semua orang yang pernah kamu dengar...
Semua manusia yang pernah ada...
Hidup..
Semua kesenangan dan kesengsaraan..
Ribuan benua, agama, ideologi dan doktrin ekonomi... Semua pemburu dan petani..
Semua pahlawan dan pengecut.. Semua pendiri dan penghancur peradaban.. Seluruh raja dan petani...
Seluruh muda-mudi yang jatuh cinta.. Semua Ayah dan Ibu.. Semua anak..
Penemu dan penjelajah.. Semua guru tentang moral.. Semua politisi korup.. Semua superstar.. Semua pemimpin hebat...
Semua orang suci dan pendosa dalam sejarah spesies kita..
HIDUP DISANA...
Di sebuah debu..
Melayang-layang di alam semesta..
Bumi.. adalah tempat yang sangat kecil...
Di dalam arena kosmik yang luas..
Tebalnya sungai darah..
Yang di tumpahkan oleh para jenderal dan kaisar..
Agar mereka bisa menjadi penguasa yang bersifat sementara....
Pada sebuah bagian-dari-sebuah-titik..."

*Mudah2an dapat menjadi perenungan*

Keajaiban Suhu Tubuh

Keajaiban Suhu Tubuh

Tahukah anda jika suhu tubuh turun 1•C daya dahan tubuh turun 30%, jika suhu naik 1•C maka daya tahan tubuh meningkat 500-600%

Saat terjaga di pagi hari minumlah air putih kira-kira 500ml, biasakanlah minum air pada suhu kamar, karena air dingin akan menurunkan suhu tubuh,

Tahukah anda KANKER suka pada suhu rendah, jika suhu tubuh rendah laju pertumbuhan kanker akan meningkat, lebih-lebih jika tubuh juga dalam keadaan asam dua kondisi yang sangat kondusif untuk sel-sel kanker tumbuh berkembang,

Selalulah menjaga agar suhu tubuh anda tetep tinggi karena sel "natural killer (NK)" yaitu limfosit yg bekerja menyerang sel kanker memiliki tingkat keaktifan pada suhu 37•C,

Minum dan berendam air hangat, jg senam perenggangan dapat membantu meningkatkan suhu tubuh.

MASASHI SAITO (dr specialis anti aging jepang, USA n eropa)

Cara (Metode) Makan Yang Sehat

Ternyata selama ini kita telah dibodohi media produk yahudi,
Yahudi ==> Makan buah sesudah makan.
Iklan dan ajaran berkembang ==> Makan buah setelah makan/alias cuci mulut.
Ajaran Islam ==> Makan buah sebelum makan.

"Bisa di cek di Google yang benar makan buah sebelum atau sesudah makan"

BANTU SHARE PADA TEMAN

JANGAN ABAIKAN, TOLONG DI BACA:

Anda dapat menyelamatkan nyawa seseorang dengan share ini.

Air Liur+Buah = Obat Cancer"

Dr. Stephen memperlakukan pasien sakit Cancer dengan cara yang "un-ortodoks" & banyak pasien Sembuh!

Ia percaya pada penyembuhan alami dalam tubuh terhadap penyakit.

Obat untuk Cancer sudah ditemukan!

Anda percaya?

Saya berdukacita bagi pasien cancer yang meninggal di bawah perawatan konvensional.

Pasien cancer tidak seharusnya mati !

Menurut DR. Shu, 3 generasi Sinshe di Taiwan:

Makan buah segar dan caranya!

Ini sangat informatif!
Umumnya makan buah berarti membeli buah, cuci, memotongnya & masukkan ke dalam mulut kita?

Tapi tidak semudah yg kita pikirkan! Pengetahuan penting bagaimana & kapan harus makan buah.

Cara yg tepat makan buah;

+ TIDAK MAKAN BUAH-BUAHAN SETELAH ANDA MAKAN.

+ BUAH HARUS DIMAKAN PD SAAT PERUT KOSONG.

BUAH ADALAH MAKANAN PALING PENTING!

BAHAYA! Buah bercampur dengan makanan lain akan membusuk & menghasilkan gas sehingga lambung akan kembung!

Menurut penelitian Dr Herbert Shelton;

Jika Anda telah menguasai cara yg benar makan buah2an,

Anda memiliki;

umur panjang,

selalu sehat,

Penuh energi,

tubuh dan pikiran jadi nyaman & berat badan normal.

Makan buah yg utuh segar dan bersih (Bukan buah/Juice kemasan kaleng/botol Plastik) lebih baik dari pada minum jus.

Tapi jika terpaksa minum jus, maka minumlah seteguk demi seteguk secara perlahan, karena Anda harus membiarkannya bercampur degan air liur Anda sebelum menelannya.

MINUM AIR ES SETELAH MAKAN = KANKER!!

Air dingin akan membuat makanan yang berminyak menjadi solid (beku)!.

Hal ini akan menghambat proses pencernaan.

Ketika 'lumpur' tsb bereaksi dgn asam, maka akan jadi lemak bertoksin(Racun) & berbaris di dalam usus dan terserap dng sangat cepat! Sehingga menyebabkan Cancer!

Cara Terbaik adalah;

* Minum air hangat setelah makan
* Makan buah segar saat perut kosong.

(Buah + Air Liur Manusia = Obat Cancer).

Thursday, March 20, 2014

Wednesday, March 19, 2014

VBA Excel - How to Insert Column

This is example of how to insert column in an excel via VBA script:

ws.Columns("S").Insert

Excel VBA - How To Insert Rows

Inserting a Row at at Row 2
Range("A2").EntireRow.Insert

'Inserting 3 Rows from 3
Rows("3:5").EntireRow.Insert

Inserting from row 1
ws.Rows(1).Insert shift:=xlShiftDown

Tuesday, March 18, 2014

Excel VBA – How to copy entire row

Sheets("Sheet1").Range("A1").EntireRow.Copy Destination:= Sheets("Sheet2").Range("A1")

 If you wish to copy the entire row to the next available row on Sheet2:
  Sheets("Sheet1").Range("A1").EntireRow.Copy Destination:= Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)

 This assumes that you already are capable of creating a macro/event handler in the VBE and simply need the syntax to copy the row.

Excel VBA – How to Find if an Array Contains a String

Function IsInArray(stringToBeFound As String, arr As Variant) As Boolean IsInArray = (UBound(Filter(arr, stringToBeFound)) > -1) End Function