Modern Çalışma

Düşeyara Formülü Nedir Ve Nasıl Kullanılır?

DÜŞEYARA/VLOOKUP İŞLEVİ Yazı başlığından da anlaşılacağı gibi, bu yazımız bir hayli uzun olacak. DÜŞEYARA formülünde uzmanlaşmak istiyorsanız, bu yazıyı sonuna kadar okuyup uygulayabilirsiniz. Excel…

22 Ağu 2023 Murat Osma
Düşeyara Formülü Nedir Ve Nasıl Kullanılır?

DÜŞEYARA/VLOOKUP İŞLEVİ

 

Yazı başlığından da anlaşılacağı gibi, bu yazımız bir hayli uzun olacak.

DÜŞEYARA formülünde uzmanlaşmak istiyorsanız, bu yazıyı sonuna kadar okuyup uygulayabilirsiniz.

Excel‘de herkesin en çok duyduğu, öğrenmek istediği ve kullandığı işlevdir. Tabloda bir değeri bulmak için DÜŞEYARA işlevini kullanırız. Bunu biraz açalım: aradığımız herhangi bir veriyi bir tabloda/veri aralığında arayıp, eğer o tabloda aradığımız veri varsa karşılığındaki bir sütundan veri almak istediğimizde DÜŞEYARA işlevini kullanırız. Örneğin; bir personel maaş tablonuz olduğunu varsayalım, bir hücrede de personel adı yer alıyor, o personel adını tablomuzda arayıp maaşını kolaylıkla bulabiliriz.

 

En basit ifadeyle DÜŞEYARA işlevi şu mantıkta çalışır;

 

Bu işlevin bizden istediği argümanlara bir göz atalım.

yaklaşık eşleme

ÇALIŞMA KOŞULLARI

  • Gerekli olarak belirtilen argümanlar girilmediğinde işlev çalışmaz.
  • aralık_bak opsiyonel argümanı girilmez ise DOĞRU – Yaklaşık Eşleşme varsayılan olarak kabul edilir.
  • aranan_değer her zaman seçilen/belirtilen tablo dizisinin en solunda (ilk sütununda) olması gerekir. Fakat bu durum, DÜŞEYARA içine başka işlevler yazılarak aşılabilir. (Aşağıda bunu göreceğiz)
  • aranan_değer belirtilen tablo_dizisinin en solunda bulunmaz ise #YOK hatası geri döner.
  • aranan_değer argümanına yazılan veriden, tablo_dizisi argümanında belirtilen aralıkta birden fazla olsa da bu işlev ilk bulduğu veriye ait olan kaydı getirir.
  • aranan_değer argümanına yazılan metinsel verinin büyük/küçük harf olmasına bakılmaz.
  • aranan_değer argümanına sayısal bir değer yazıldığında, tablo_dizisi olarak belirtilen ilk sütundaki veri türü metin ise #YOK hatası geri döner, ters durumda da aynı koşul geçerli olur.
  • sütun_indis_sayısı argümanına 1‘den küçük veya belirtilen tablo aralığındaki sütun sayısından büyük bir sayı ya da bir metinsel ifade yazılırsa #DEĞER! hatası geri döner.
  • tablo_dizisi olarak belirtilen alandan bir sütun silindiğinde #BAŞV! hatası geri döner.
  • aralık_bak opsiyonel argümanındaki DOĞRU ve YANLIŞ yerine bunların sayısal karşılıkları olan 1 veya 0 yazılabilir.
  • DOĞRU – Yaklaşık Eşleşme seçilir ise; tablodaki ilk sütunun sayısal veya alfabetik olarak sıralanacağını varsayar ve tabandaki en yakın değeri arar. Yöntem belirtmezseniz, varsayılan yöntem olarak bu kullanılır.
  • YANLIŞ – Tam Eşleşme seçilir ise; tablo_dizisinin ilk sütununda, aranan_değer argümanında belirtmiş olduğunuz veri ile birebir aynı olan varsa o değeri arar.

 

DÜŞEYARA İŞLEVİNİN TEMEL KULLANIMI

Aşağıdaki görselde, DÜŞEYARA İşlevinin temel yazım ve çalışma koşullarına uygun bir arama örneğini görüyorsunuz.

düşeyaradüşeyara işlevinin temel kullanımı

 

Sami Önder ismini B3:D9 hücre aralığındaki ilk sütun olan B sütununda bulursa, seçilen aralıktaki 3. sütundaki veriyi getir demiş olduk. Son argümandaki YANLIŞ ifadesi yerine 0 yazılabileceğinden bahsetmiştik. Bu YANLIŞ ifadesiyle B sütununda birebir Sami Önder olup olmadığına bak denilir..

JOKER KARAKTER KULLANIMI

Aynı tablo üzerinde aradığımız ismin tamamını yazmadan, sadece ismini yazıp devamına joker karakter kullanarak aynı sonucu elde edebiliyoruz. Excel‘de kullanabileceğimiz Joker Karakterleri kısaca bir hatırlayalım.

Üç farklı Joker karakterimiz mevcut.

Yıldız ve soru işareti herhangi bir metnin önüne ve sonun gelerek DÜŞEYARA işlevinde aranan_değer argümanında tamamlayıcı görevi görürler.

~ işareti ise sadece joker karakterlerin önüne gelerek o karakterleri kısıtlama işlevi görür.

Eğer Joker karakteri metnin önüne gelirse, sonu yazılan metin ile bitiyorsa denir. Örnek; *ali (ali ile bitiyorsa)

Eğer Joker karakteri metnin sonuna gelirse, sonu yazılan metin ile başlıyorsa denir. Örnek; ali* (ali ile başlıyorsa)

Eğer Joker karakteri metnin hem önüne, hem de arkasına gelirse, yazılan metin içinde geçiyorsa denir. Örnek; *ali* (içinde ali geçiyorsa)

soru işareti için de şöyle bir örnek verelim; ?ali yazıldığında ali kelimesinden önce herhangi 1 karakter (metinsel ifade, harfler veya işaretler) var denir.

Bahsettiğim duruma örnek olarak bu görseli inceleyebilirsiniz. ‘=F4&”*”

 

 

BİRDEN FAZLA SÜTUNDAKİ VERİLERİ GETİRME YÖNTEMLERİ

Excel‘de yeni eklenen dinamik dizi işlevleri haricinde diğer tüm işlevler/fonksiyonlar geriye tek bir sonuç döndürürler. DÜŞEYARA formülü yazarak bir sonuç elde ettiğimizde, tablodaki diğer verileri de formülü sağa doğru çekerek elde etmek isteyebiliriz. Her sütun için ayrı ayrı formül yazmak yerine, değişen sütun_indis_sayısı argümanına dinamik olarak değişmesini sağlayacak bir işlev dahil ederek formülü yazdığımız hücreyi sağa doğru çektiğimizde, tablo_dizisi olarak belirttiğimiz alandaki diğer sütunlardan da veri almasını sağlayabiliyoruz. Bu işlemi birkaç farklı yolla yapabiliriz, şimdi bu yolları inceleyelim..

İLK YÖNTEMİMİZ..

Buradaki gibi bir tablomuz olduğunu varsayalım.

Aranan Personel adını yazıp, sağa doğru çektiğimizde T.C. Kimlik No ve Maaşı alanındaki verilerin de gelmesini sağlayacağız.

 

Bu tarz bir işlem yapabilmek için öncelikle formülümüzü doğru yazmamız gerekecek.

Doğru formülden kasıt; hücre başvuru stillerini doğru kullanmaktan bahsediyoruz.

Yani bir hücreyi veya hücre aralığını seçerken o hücreleri sabitleyecek miyiz, sabitlemeyecek miyiz, yoksa sadece satırı veya sadece sütunu mu sabitleyeceğiz?.. gibi.. soru işaretlerine cevap olarak, hücreyi seçince $ (dolar) işaretlerini olması gereken yerlere doğru biçimde yazmalıyız. Sonrasında sütun_indis_sayısı kısmını dinamik, yani değişken yapmamız sağlayacak bir işlev/fonksiyon kullanmamız gerekecek.

Öncelikle $ (dolar) işaretlerini doğru kullanarak tek bir hücre için formülümüzü oluşturalım.

Sonra diğerleri için de formülün nasıl olması gerektiğine bakacağız.

Evet.. Hadi başlayalım.

Formülde bir hücreyi seçerken ilk etapta yukarıda belirttiğimiz sabitleme olup olmayacağı konusunu düşünmeliyiz. Bizim Aranan Personel adını yazdığımız hücrenin yeri sabit olduğu için, o hücreyi seçtiğimizde F4‘e basıp sabitliyoruz. tablo_dizisi argümanı için seçtiğimiz hücre aralığının da yeri sabit olduğu için, o hücre aralığını da F4‘e basıp sabitliyoruz ve formülümüz resimde de göreceğiniz üzere bu hâle gelecektir. =DÜŞEYARA($G$2;$B$1:$E$7;2;0)

 

 

Şimdi formülümüzü sağa doğru çektiğimizde sütun_indis_sayısı argümanına elle 2 yazdığımız için o kısım hep 2 olarak kalacaktır. Bizim buradaki amacımız; formülü sağa doğru çektiğimizde, sütun_indis_sayısı argümanının 2,3,4 şeklinde artarak değişmesini ve o sütunlara denk gelen verilerin alınmasını sağlamak. İşte tam da burada SÜTUN fonksiyonu imdâdımıza yetişiyor.

 

SÜTUN FONKSİYONU NE İŞE YARAR, NASIL KULLANILIR?

Bu fonksiyon mevcut sütun veya belirtilen başvuruya ait sütun numarasını döndürür.

İki şekilde kullanılır.

=SÜTUN() şeklinde yazıldığında, hangi hücreye yazılırsa o hücrenin sütun numarasını verir.

=SÜTUN(başvuru adresi) şeklinde yazıldığında, başvuru adresi olarak belirtilen hücre adresindeki sütun numarasını verir.

Eğer E10 hücresine =SÜTUN() formülünü yazarsanız, E sütunu Excel’de 5. sütun olduğu için formül size 5 sayısını döndürür. Aynı şekilde, eğer E10 hücresine =SÜTUN(B1) forlümün yazarsanız, B sütunu Excel’de 2. sütun olduğu için formül size 2 sayısını döndürür.

B1 hücre adresinde hiçbir sabitleme yapmadığımız için formülü sağa doğru çektiğimizde C1, D1, E1 olarak değişecektir, bu da bize 2,3,4,5 sayılarını elde etmemizi sağlar. Tam da bu sayede, tablo_dizisi aralığındaki diğer sütunlardan da veriyi alabilmiş olacağız.

Olmasını istediğimiz durum için örnek formülü aşağıda görebilirsiniz.

 

İKİNCİ YÖNTEMİMİZ..

Bu yöntemde yardımcı bir fonksiyon kullanmayacağız ama yine değişen argümanımız sadece sütun_indis_sayısı olacağı için o kısımda dizi ile sonuç almaya çalışacağız. sütun_indis_sayısı olacağı için o kısımda dizi ile sonuç almaya çalışacağız. Yani almak istediğimiz sütun indis sayılarını {2;3;4} şeklinde yazıp dizi formülü hâline dönüştürerek bu sayıların her bir sütuna aktarılmasını sağlayacağız.

Bu işlemi nasıl yapacağımızı belirtelim;

  • H2 hücresindeki formülümüzü resimdeki gibi düzenleyelim.
  • Sonrasında formülün sonuçlarını aktaracağımız alanı seçelim. (H2:J2)
  • F2 tuşuna basıp hücrenin içerisine girelim.
  • Ctrl + Shift + Enter tuşlarına basarak formülün girişini tamamlayalım.

 

sütun_indis_sayısı argümanını bu şekilde {…..} küme parantezi içerisinde istediğimiz sütun_indis_sayısı‘nı yazabilmemiz, istediğimiz sütunlardaki verileri almamızı sağlayarak bize esneklik kazandıracaktır.

SAĞDAN DÜŞEYARA

Bildiğiniz üzere, Excel’de aramalar her zaman soldan sağa doğru yapılır. Aramalar sütunlarda veya bir metnin karakterlerinde soldan sağa doğru olabilir. Birçok fonksiyon da, arka plânda bu mantıkla hazırlanmış ve kullanıma sunulmuştur. DÜŞEYARA fonksiyonu da bu fonksiyonlardan biridir.

Yukarıdaki Çalışma Koşullarında da belirttiğimiz üzere, DÜŞEYARA fonksiyonunda aranan_değer her zaman belirtilen tablo_dizisinin ilk sütununda bulunması gerekir, bulunmaz ise formül geriye #YOK hatası döndürür. Bu arada, aslında bu bizim düşündüğümüz gibi bir “hata” değil, sadece aranan verinin tabloda olmadığını gösteren bir uyarıdır. Aradığımız bir verinin, belirttiğimiz aralığın ilk sütununda yoksa hata vermesi durumu DÜŞEYARA fonksiyonunun kodlamsal bir sonucudur.

Bu duruma bir örnek verelim isterseniz.

Eğer Murat OSMA isimli personeli ararken, tablo_dizisi argümanı için seçilen hücre aralığı A sütunundan başlarsa, hâliyle seçtiğimiz alanın ilk sütununda personel ismini bulamayacağı için geriye hata döndürecektir. Bu gayet normaldir.

 

 

DÜŞEYARA işlevinin hata almamıza sebep olan bu çalışma şeklini istersek kendi isteğimize göre düzenleyebiliriz. Bunun da yine birkaç farklı yöntemi var, fakat sizin için kolay olanı izah etmeye çalışalım.

ELEMAN adında bir fonksiyonumuz var. Bu fonksiyon bizden bir dizin_sayısı ister, bir de dizinler, yani veri kümeleri belirtmemizi/seçmemizi ister. Aşağıdaki görselde yazılan formül şudur; =ELEMAN(1;C1:C7;B1:B7) Bu formülde, dizin_sayısı olarak 1 yazdık, sonrasında her bir veri aralığını (dizinleri) seçtik, önce C1:C7 aralığını, sonra da B1:B7 aralığını. dizin_sayısına 1 yazdığımız ve 1. veri aralığı olarak C1:C7 aralığını seçtiğimiz için bu formül geriye C1:C7 aralığındaki verileri döndürecektir. dizin_sayısına 2 yazmış olsaydık, B1:B7 aralığındaki verileri geri döndürmüş olacaktık.

 

İşte biz bu dizin_sayısı ve dizinleri belirttiğimiz anda kendi istediğimiz sütundaki veriyi getirmiş oluruz. Aşağıda, hatanın oluşmasını engellemek ve istediğimiz veriyi alabilmek adına kullanabileceğiniz formülü görüyorsunuz. DÜŞEYARA fonkiyonu içerisindeki tablo_dizisi argümanında ELEMAN fonksiyonunu kullanarak, dizin_sayısı argümanında { … } içerisinde sütun_indis_sayısı kısmına ne yazarsak, ona göre hangi aralıktaki sonucu getirmesini istediğimizi belirtiyoruz. Bu sayede, sütun_indis_sayısı argümanına 1 yazarsanız B2:B7 aralığındaki sonucunu, 2 yazarsanız da A2:A7 aralığındaki sonucu alacağınızı göreceksiniz.

 

 

ARALIK BAK ARGÜMANINI [DOĞRU – YAKLAŞIK EŞLEŞME] ( 1 ) KULLANMAK

 DÜŞEYARA fonksiyonunu, genellikle aradığımız değerle birebir eşleşene ait verileri almak için kullanıyoruz.

Bu fonksiyonu kullananların %95‘i de [aralık_bak] argümanını YANLIŞ – Tam Eşleşme yani 0 olarak kullanıyor.

Peki nedir bu DOĞRU – Yaklaşık Eşleşme?

Argümana baktığınızda açıklama olarak; “tablo_dizisi ilk sütunundaki veriler artan sırada sıralanmalıdır” der.

O yüzden [aralık_bak] değeri DOĞRU seçildiğinde, DÜŞEYARA’yı kullanmadan önce tablo_dizisi değerinin ilk sütununu sıralayın. Sıralamazsanız yanlış bir veriyi getirme ihtimali, tesadüf olmadığı sürece oldukça yüksektir.

tablo_dizisi alanındaki verilerimiz sıralı değilse, birebir eşleşen olsa dahî #YOK hatası geri döner.

NE ZAMAN DOĞRU – YAKLAŞIK EŞLEŞMEYİ KULLANMALIYIZ?

  • tablo_dizisi alanındaki verilerimiz sıralıysa DOĞRU – Yaklaşık Eşleşmeyi kullanabiliriz.
  • Sayısal bir değer arıyorsak ve onunla eşleşen bir sayı varsa, veya eşleşen bir sayı yoksa ona en yakın tabandaki sayıyı getirmek için de kullanabiliriz.

Şimdi bu duruma bir örnek verelim.

Aşağıdaki görselde yazılan formülde yapmak istediğimiz;

Maaşı 3300 olan veya ona en yakın olan sayılar içerisinde tabandaki bulduğu Maaşa ait Personel Adını bulmak istedik.

Bu işlemin doğru sonuç vermesi için tablo_dizisi argümanının ilk sütunundaki verilerin sıralı olması gerektiğini unutmayalım. Yazdığımız formül bize, tablomuzda Maaşı 3300 olan olmadığı için, ona en yakın olan 3250‘ye ait Personel Adını, yani Sami Önder sonucunu verecektir.

 

 

İKİ VE DAHA FAZLA KRİTERE GÖRE DÜŞEYARA

DÜŞEYARA fonksiyonunu, şimdiye kadar bir veriyi arayıp tabloda bulduktan sonra o tablodaki istenen sütundaki veriyi almak için kullandık. İstersek birden fazla kritere göre de sonucu alabiliriz.

Aşağıdaki görselde şunu almak istediğimizi belirttik; Maaşı 2500 ise ve Doğum Yeri İzmir ise ona uygun olan satırdaki Personel Adını al. Onun için de bu formülü kullandık; =YERİNEKOY(DÜŞEYARA(G2&H2&”*”;B1:B7&D1:D7&C1:C7;1;0);G2&H2;””) Burada şöyle bir teknik uyguladık;

aranan_değer argümanına Maaşı ile Doğum Yerini birleştirip (G2&H2) sonuna da &”*” ekleyerek, şartlarımızın bunlarla başladığını belirttik.

tablo_dizisi argümanında da Maaşı, Doğum Yeri ve sonuç olarak almak istediğimiz Personel Adı aralıklarını birleştirdik.

sütun_indis_sayısı argümanında, almak istediğimiz ve aradığımız aralıkları & ile tek bir alanda birleştirdiğimiz için 1 yazdık.

aralık_bak argümanı Tam Eşleşme için 0 yazdık..

Sonuç olarak bize 2500İzmirSami Önder metnini geri dönderdi.

Son olarak da, YERİNEKOY fonksiyonu ile geri dönen metinden, aranan_değer argümanına yazdığımız veriyi boş bırak dediğimizde, geriye sadece Personel Adı kalacaktır. Bu sayede birden fazla kritere göre aradığımız veriyi bulabildik.

 

ARANAN VERİ TÜRÜ İLE BAKILAN VERİ TÜRÜ FARKLI OLDUĞUNDA NE YAPMALI?

 Bazen hücre biçimlerinden dolayı, sayısal olması gereken verilerin hücre biçimleri metin olarak belirlenebiliyor.

Bu durumda Exce’in sizi o hücrelerin sol üst köşelerinde yeşil üçgenlerle ve sarı uyarı simgesiyle uyardığını fark etmişsinizdir. O uyarı simgesini tıkladığınızda açıklama olarak; Metin Olarak Saklanan Sayı ibaresini göreceksiniz. O açıklama bize; hücreye yazılan veri türü sayısal ama hücre biçimi metin olduğundan ben yine de sizin yerinize yazdığınız bu sayıyı metin olarak saklıyorum der..

Eğer aranan_değer olarak belirtilen hücredeki veri türü metinsel bir ifade ise,

tablo_dizisi olarak belirttiğimiz hücre aralığının ilk sütundaki veri türleri de metin olmak zorunda.

Ya da tam tersi bir durumu de düşünebilirsiniz. Özetle; aranan ve bakılan verilerin türleri aynı olmalı.

Eğer aynı veri türüne sahip değil ise #YOK hatası geri döndürmesine sebep olmakta.

Aşağıdaki görselde bu durumla ilgili örneği görebilirsiniz. Kullanılan formül; =DÜŞEYARA(G2;B1:E7;2;0)

aranan_değer veri türü metin, belirtilen tablo_dizisinin ilk sütunundaki veriler de sayısal olduğunda eşleşme sağlanamıyor ve geriye #YOK hatası dönüyor.

 

 

Peki bu durumu nasıl çözebiliriz? Çok basit!

aranan_değer olarak belirtilen metinsel ifadeyi sayıya dönüştürecek bir matematiksel işlem uygulayarak durumu çözebiliriz.. Uygulanacak bu matematiksel işlemler mevcuttaki sayıyı etkilemeyecek bir işlem olmalı. Örneğin; +0, *1, /1, ^1 ya da — (artı 1, çarpı 1, bölü 1, üssü 1, tire tire) gibi herhangi bir matematiksel işleme sokarsak aşağıda göreceğiniz sonucu elde edebiliriz.

Kullanılan formül; =DÜŞEYARA(G2+0;B1:E7;2;0)

 

İÇ İÇE EĞERLER YAZMAK YERİNE DÜŞEYARA’YI KULLANIN

Bazı tablolarımızda, örneğin; hak edilen yıllık izin hesaplama işlemi yapılmak istendiğinde, birçok EĞER fonksiyonu iç içe yazılarak çözüm bulunabilir. Fakat DÜŞEYARA size bu işlemi çok daha kısa yoldan çözme imkânı tanıyor. Haydi gelin aynı işlemleri bir İÇ İÇE EĞER yazarak, bir de DÜŞEYARA fonksiyonu kullanarak yapalım.. farkı göreceksiniz.

Aşağıdaki gibi bir tablomuz olduğunu varsayalım. Farklı süreçlere gere farklı oranlar belirleyeceğiz. Eğer, iç içe Eğer fonksiyonları kullanarak yapmak istersek formülümü bu şekilde oldukça uzun yazmamız gerekecek.

=EĞER(C2=”CV Search”;10%;EĞER(C2=”Bizde Mülakat Aşamasında”;20%;

EĞER(C2=”Aday Paylaşıldı”;40%;EĞER(C2=”Müşteride 1.Mülakatta”;50%;

EĞER(C2=”Müşteride 2. Mülakatta”;70%;EĞER(C2=”Müşteri Assessment Aşamasında”;80%))))))

 

 

Halbuki tüm süreçlere ve oranlara ait bir tablomuz olsa, DÜŞEYARA fonksiyonu ile yüzde oranını bulmak oldukça kolay olurdu.

 

 

Eveeet..

Buraya kadar tüm anlatılanları okuyup, anlayıp, uyguladıysanız, artık DÜŞEYARA konusunda UZMAN oldunuz demektir.

Excel eğitimlerimiz hakkında detaylı bilgi alabilirsiniz

 

Paylaş: LinkedIn X WhatsApp

Bu kategoriden diğer yazılar

Modern Work

What is the Vlookup formula and how is it used?

VLOOKUP/VLOOKUP FUNCTION As the title of the article suggests, this article will be quite long. If you want to master the VLOOKUP formula, you can read and apply this post to the end. Excel...

Aug 22, 2023 Murat Osma
What is the Vlookup formula and how is it used?

VLOOKUP/VLOOKUP FUNCTION

 

As the title of the article suggests, this article will be quite long.

If you want to master the VLOOKUP formula, you can read and apply this post to the end.

It is the function that everyone hears, wants to learn and uses the most in Excel. We use the VLOOKUP function to find a value in the table. Let's break this down a bit: when we search for any data we are looking for in a table/data range and want to get data from a corresponding column if there is data we are looking for in that table, we use the VLOOKUP function. For example; Let's say you have a staff salary table, there is a staff name in a cell, we can easily find the salary by searching for that staff name in our table.

 

In the simplest terms, the VLOOKUP function works on the following logic;

 

Let's take a look at the arguments that this function asks of us.

yaklaşık eşleme

WORKING CONDITIONS

  • The function does not run when the arguments specified as required are not entered.
  • interval k_bak optional argument is not entered, TRUE – Approximate Match is considered the default.
  •  aranan_değer should always be on the far left (first column) of the selected/specified table array. However, this can be overcome by writing other functions in VLOOKUP . (We will see this below)
  •  If aranan_değer is not located on the far left of the specified tablo_dizisi, the #YOK error returns.
  •  Even if there is more than one of the data written in the aranan_değer argument in the range specified in the tablo_dizisi argument, this function returns the record of the first data it finds.
  •  aranan_değer argument does not matter whether the textual data written is uppercase or lowercase.
  •  When a numeric value is written in the aranan_değer argument, if the data type in the first column specified as tablo_dizisi is text, the #YOK error is returned, and the same condition applies in the opposite case.
  • If a number less than 1 or greater than the number of columns in the specified table range or a textual expression is written in the sütun_indis_say heat argument, #DEĞER! error returns.
  •  When a column is deleted from the field specified as tablo_dizisi, #BAŞV!  error returns.
  • interval k_bak instead of TRUE and FALSE in the optional argument, their numerical equivalents 1  or 0 can be written.
  • If TRUE – Approximate Match is selected; It assumes that the first column in the table will be sorted numerically or alphabetically, and looks for the nearest value in the base. If you don't specify a method, it's used as the default method.
  • FALSE – If Exact Match is selected; In the first column of tablo_dizisi, if there is one that is exactly the same as the data you specified in the aranan_değer argument, it searches for that value.

 

BASIC USE OF THE VLOOKUP FUNCTION

In the following image, you see an example of a search that matches the basic writing and working conditions of the VLOOKUP Function.

düşeyaraBasic use of the VLOOKUP function

 

If Sami Önder finds his name in column B , which is the first column in the cell range B3:D9 , we said fetch the data in the 3rd column in the selected range. We mentioned that 0 can be written instead  of the FALSE statement in the last argument. With this FALSE statement , it is said to see if there is a Sami Önder in column B .

USE OF WILDCARD CHARACTERS

We can get the same result by typing only the name and using a wildcard character without writing the entire name we are looking for on the same table. Let's briefly recall the Wildcard Characters we can use in Excel.

We have three different Joker characters.

The asterisk and question mark come before and end any text, serving as complements in the VLOOKUP function aranan_değer argument.

 The ~ sign only comes in front of wildcard characters and functions to restrict those characters.

If the Joker character comes before the text, it is called if it ends with the written text.  Example; *ali (if it ends in ali)

If the Joker character comes to the end of the text, it is called if it starts with the written text. Example; ali* (if it starts with ali)

If the Joker character appears both before and after the text, it is called if it is mentioned in the written text. Example; *ali* (if ali is in it)

Let's give an example for the question mark; When ?ali is written, it is said that there is any 1 character (textual expression, letters or signs) before the word ali.

You can examine this image as an example of the situation I mentioned. '=F4&"*"

 

 

METHODS TO FETCH DATA FROM MULTIPLE COLUMNS

Except for the newly added dynamic array functions in Excel, all other functions/functions return a single result backwards. When we get a result by typing the VLOOKUP formula, we may want to obtain the other data in the table by pulling the formula to the right. Instead of writing a separate formula for each column, we can include a function that will allow it to change dynamically in the changing sütun_indis_say temperature argument and when we pull the cell where we wrote the formula to the right, we can get data from other columns in the field we specify as tablo_dizisi . We can do this in several different ways, now let's examine these ways.

OUR FIRST METHOD..

Let's assume we have a table like this one.

When we type the name of the Wanted Personnel and pull it to the right, we will ensure that the data in the TR Identity Number and Salary field also appears.

 

In order to do this kind of operation, we will first need to write our formula correctly.

What is meant by the correct formula; we're talking about using cell reference styles correctly.

So when selecting a cell or range of cells, will we pin those cells or not, or will we pin only the row or only the column?.. etc.. In response to the question marks, when we select the cell, we must write the $ (dollar) signs correctly where they should be. Then we will need to use a function/function that will allow us to make the sütun_indis_say heat part dynamic, that is, variable.

First, let's create our formula for a single cell using the $ (dollar) signs correctly.

Then we will look at what the formula should be like for the others.

Yes.. Let's get started.

When selecting a cell in the formula, we should first consider whether it will have the fixing mentioned above. Since the location of the cell where we write the name Wanted Personnel is fixed, when we select that cell, we press F4 and fix it. Since the cell range we selected for the tablo_dizisi argument is also fixed, we press F4 and fix that cell range and our formula will become like this, as you can see in the picture. =VLOOKUP($G$2;$B$1:$E$7; 2; 0)

 

 

Now, when we pull our formula to the right, that part will always remain 2 because we manually write 2 in the sütun_indis_say heat argument. Our aim here is; When we pull the formula to the right, we get the sütun_indis_say heat argument to change incrementally as 2,3,4 and get the data corresponding to those columns. This is where the COLUMN function comes to our rescue.

 

WHAT DOES THE COLUMN FUNCTION DO, HOW IS IT USED?

This function returns the column number for the current column or the specified reference.

It is used in two ways.

=When written as COLUMN(), it gives the column number of the cell in which it is written.

=When typed as COLUMN(reference address), it returns the column number at the cell address specified as the reference address.

If you type the formula =COLUMN() in cell E10 , the formula will return you the number 5 because column E  is the 5th column in Excel . Likewise, if you type =COLUMN(B1) in cell E10 , the formula will return you the number 2 because column B is the 2nd column in Excel.

Since we have not made any fixings in cell address B1 , when we pull the formula to the right, it will change to C1, D1, E1 , which allows us to get the numbers 2,3,4,5 . In this very way, we will be able to get data from other columns in the tablo_dizisi range.

You can see the sample formula for the situation we want it to happen below.

 

OUR SECOND METHOD..

In this method, we will not use an auxiliary function, but since our changing argument will only be sütun_indis_say heat , we will try to get a result with an array in that part. Since there will be sütun_indis_say heat , we will try to get a result with an array in that part. In other words, the column index numbers we want to get {2; 3; 4} and convert it into an array formula so that these numbers are transferred to each column.

Let's specify how to do this;

  • Let's edit our formula in cell H2 as shown in the picture.
  • Then let's select the field where we will transfer the results of the formula. (H2:J2)
  • Let's press the F2 key and enter the cell.
  • Let's complete the input of the formula by pressing Ctrl + Shift + Enter .

 

sütun_indis_say heat argument in this way {.....} Being able to write the sütun_indis_say Heat we want in curly brackets will give us flexibility by allowing us to get the data in the columns we want.

RIGHT TO VLOOKUP

As you know, searches in Excel are always made from left to right. Searches can be in columns or characters of a text from left to right. Many functions have been prepared and put into use with this logic in the background. The VLOOKUP function is one of these functions.

As we mentioned in the Operating Conditionsabove , in the VLOOKUP function, the aranan_değer must always be present in the first column of the specified tablo_dizisinin , if it is not found, the formula returns a #YOK error . By the way, in fact, this is not an "error" as we think, but just a warning that the data sought is not in the table. The fact that a data we are looking for gives an error if it is not in the first column of the range we specify is a codified result of the VLOOKUP function.

Let's give an example of this situation.

If the cell range selected for the tablo_dizisi argument starts from column A while searching for the personnel named Murat OSMA , it will return an error because it will not be able to find the personnel name in the first column of the field we selected. This is quite normal.

 

 

If we want, we can edit this way of working of the VLOOKUP function, which causes us to get an error, according to our own wishes. There are a few different methods for this, but let's try to explain the easy one for you.

We have a function called ELEMAN . This function asks us for a dizin_say heat and also asks us to specify/select indexes, i.e. datasets. The formula written in the image below is as follows;  =ELEMENT(1; C1:C7; B1:B7) In this formula, we typed 1 as dizin_say heat , then selected each data range (indexes), first the range C1:C7 , and then the range B1:B7 . dizin_say Sincewe wrote heat na 1 and selected the range C1:C7 as the 1st data range, this formula is left with C1: C7 . dizin_say Ifwe had written heat na 2 , we would have returned data in the range B1:B7.

 

As soon as we specify these dizin_say heat and indexes, we bring the data in the column we want. Below you can see the formula you can use to prevent the error from occurring and to get the data we want. Using the ELEMENT function in the tablo_dizisi argument in the VLOOKUP function, you can use the dizin_say { ... } Whatever we write in the sütun_indis_say heat section, we specify the range we want it to bring the result. In this way, you will see that if you write 1 in the sütun_indis_say heat argument, you will get the result in the range B2:B7 , and if you type 2 , you will get the result in the range A2:A7.

 

 

USING THE RANGE LOOK ARGUMENT [TRUE – APPROXIMATE MATCH] (1)

 We use the VLOOKUP function to retrieve data that usually matches the value we are looking for.

95% of those who use this function use the [interval k_bak] argument as FALSE – Exact Match , i.e. 0.

So what is this TRUE – Approximate Match?

When you look at the argument, as an explanation; It says, "The data in the first column of tablo_dizisi should be sorted in ascending order."

So when [interval k_bak] is selected TRUE , sort the first column of the tablo_dizisi value before using VLOOKUP. If you don't sort it, the probability of bringing up the wrong data is quite high, unless it is a coincidence.

 If our data in the tablo_dizisi field is not sequential, the #YOK error will return, even if it matches exactly.

WHEN SHOULD WE USE THE CORRECT – APPROXIMATE MATCH?

  •  If our data in the tablo_dizisi field is ordered, we can use TRUE – Approximate Match.
  • If we are looking for a numerical value and there is a number that matches it, or if there is no matching number, we can also use it to fetch the number closest to it.

Now let's give an example of this situation.

What we want to do in the formula written in the image below;

We wanted to find the Personnel Nameof the Salaryfound at the base among the numbers with a salary of 3300 or closest to it.

Let's not forget that the data in the first column of the tablo_dizisi argument must be sequential for this operation to give a correct result. The formula we wrote will give us the Personnel Nameof the closest 3250, that is , Sami Önder , since there is no salaryof 3300 in our table.

 

 

VLOOKUP ACCORDING TO TWO OR MORE CRITERIA

So far, we have used the VLOOKUP function to retrieve the data in the desired column in that table after searching for a data and finding it in the table. If we want, we can get the result according to more than one criterion.

In the image below, we stated that we wanted to buy this; If his salary is 2500 and his Place of Birth is Izmir, take the Personnel Name in the appropriate line. That's why we used this formula; =SUBSTITUTE(VLOOKUP(G2&H2&"*"; B1:B7&D1:D7&C1:C7; 1; 0); G2&H2;"") Here we applied a technique like this;

 aranan_değer argument by combining Salary and Place of Birth (G2&H2) and adding &"*" to the end , we stated that our conditions start with these.

 In the tablo_dizisi argument, we combined the ranges of Salary, Place of Birth , and Staff Name that we want to get as a result.

In the sütun_indis_say heat argument, we wrote 1 because we combined the ranges we wanted to get and were looking for in a single field with & .

interval k_bak argument We wrote 0 for Exact Match .

As a result, he would return the text of 2500İzmirSami Önder to us .

Finally, when we say leave the data we wrote in the aranan_değer argument blank from the text returned with the SUBSTITUTE function, only the Personnel Name will remain. In this way, we were able to find the data we were looking for according to more than one criterion.

 

WHAT TO DO WHEN THE TYPE OF DATA SOUGHT AND THE TYPE OF DATA LOOKED AT ARE DIFFERENT?

 Sometimes, due to cell formats, the cell formats of data that should be numeric can be specified as text.

In this case, you may have noticed that Exce warns you with green triangles in the upper left corners of those cells and a yellow warning icon. When you click that warning icon, as an explanation; You will see Number Stored as Text . That statement told us; It says that the data type written in the cell is numeric, but since the cell format is text, I still keep this number you wrote for you as text.

If the data type in the cell specified as aranan_değer is a textual expression,

 tablo_dizisi, the data types in the first column of the cell range we specify must also be text.

Or you can think of the opposite situation. In summary; The types of data searched and looked at must be the same.

If it does not have the same data type, it causes the #YOK error to return.

You can see an example of this situation in the image below. The formula used; =VLOOKUP(G2; B1:E7; 2; 0)

 aranan_değer data type is text, and when the data in the first column of the specified tablo_dizisiis also numeric, a match cannot be achieved and a #YOK error is returned.

 

 

So how can we solve this situation? It's simple!

 aranan_değer we can solve the situation by applying a mathematical operation that will convert the specified textual expression into a number. These mathematical operations to be applied should be a process that will not affect the current number. For example; +0, *1, /1, ^1 or — (plus 1, times 1, divided by 1, exponent 1, hyphen), etc., we can get the result you see below.

The formula used; =VLOOKUP(G2+0; B1:E7; 2; 0)

 

USE VLOOKUP INSTEAD OF WRITING NESTED IFS

In some of our tables, for example; When you want to calculate the annual leave detitled, a solution can be found by writing many IF functions inside each other. However, VLOOKUP allows you to solve this process in a much shorter way. Let's do the same operations by typing a NESTED IF and using the VLOOKUP function. You will see the difference.

Suppose we have a table like the one below. We will determine different rates according to different processes. If we want to do it using nested  functions, we will have to write our formula in this way for quite a long time.

=IF(C2="CV Search"; 10%; IF(C2="We Are In The Interview Phase"; 20%;

IF(C2="Candidate Shared"; 40%; IF(C2="In the 1st Interview at the Customer"; 50%;

IF(C2="Customer has 2. In the interview"; 70%; IF(C2="Customer Assessment Stage"; 80%))))))

 

 

However, if we had a table of all processes and ratios, it would be quite easy to find the percentage with the VLOOKUP function.

 

 

Oops..

If you have read, understood and applied everything explained so far, it means that you have now become an EXPERT in VLOOKUP .

You can get detailed information about our Excel trainings

 

Related posts