Loncat ke daftar isi utama

Bagaimana cara mengekstrak inisial dari nama di Excel?

Saat Anda memproses catatan pelanggan atau melakukan gabungan surat, mendapatkan inisial dari nama tertentu mungkin berguna untuk Anda, misalnya, HG untuk Hal Greer. Jadi di sini saya perkenalkan beberapa trik agar Anda cepat mengekstrak inisial dari daftar nama di Excel.

Ekstrak inisial dengan rumus di Excel

Ekstrak inisial menggunakan Fungsi yang Ditentukan di Excel


panah gelembung kanan biru Ekstrak inisial dengan rumus di Excel

Metode pertama menggunakan rumus untuk mengekstrak inisial dari nama di Microsoft Excel.

Pilih sel kosong, misalnya, Sel C2, ketikkan rumus ini =LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")(A2 adalah sel pertama dari daftar nama Anda), tekan Enter tombol, lalu seret gagang isian untuk mengisi kisaran. Sekarang Anda melihat semua inisial setiap nama diekstraksi dari daftar nama.


panah gelembung kanan biru Ekstrak inisial menggunakan Fungsi yang Ditentukan di Excel

Selain rumus, Anda dapat menggunakan Fungsi yang Ditentukan untuk mengekstrak inisial dari nama tertentu dengan mudah di Microsoft Excel.

1. Pilih sel kolom yang ingin Anda pilih dan tekan Alt + F11 untuk membuka Microsoft Visual Basic untuk Aplikasi jendela.

2. Di jendela pop-up, klik Menyisipkan > Modul, lalu tempel kode VBA berikut ke dalam modul.

VBA: Ekstrak inisial dari nama

Function FirstCharacters(pWorkRng As Range) As String
'Updateby20140514
Dim arr As Variant
Dim xValue As String
Dim OutValue As String
xValue = pWorkRng.Value
arr = VBA.Split(Trim(xValue))
For i = 0 To UBound(arr)
    OutValue = OutValue & VBA.Left(arr(i), 1) & "."
Next
FirstCharacters = OutValue
End Function

3. Simpan kode dan tutup jendela, pilih sel kosong dan ketikkan rumus ini = Karakter Pertama (A2), Lalu tekan Enter tombol, dan seret gagang isian untuk mengisi rentang yang Anda inginkan. Setelah itu, Anda bisa melihat inisial tiap nama yang diekstrak.

jenis: Anda dapat mengubah pemisah "" dari inisial yang Anda butuhkan di VBA di atas.


Artikel Relatif:

Alat Produktivitas Kantor Terbaik

馃 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,
I need to extend this code to 4 initials, but I don鈥檛 understand how to extend it.

=LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")

Please can you explain how to add another layer to this formula?
This comment was minimized by the moderator on the site
Hi, use the formula like this:
=LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2,FIND(" ",A2)+1)+1)+1,1),"")

About the explaination, it not few words can explan. You may know what the functions in the formula is used for what destination. If you want to learn the function, you can visit this site: https://www.extendoffice.com/excel/functions.html
This comment was minimized by the moderator on the site
Thank you so much. This worked perfectly.
This comment was minimized by the moderator on the site
If u need the prefix of Mr., Ms. or Mrs. can add it in the beginning as =LEFT(A2,SEARCH(" ",A2))&
This comment was minimized by the moderator on the site
Very good formula to get the initials from a name. But if the name contains with Mr., Ms. or Mrs. then this does not work. We have to separate put this prefix first. For that you can replace the A2 with TRIM(MID(A2,SEARCH(" ",A2)+1,100)) . So the formula will be as under
=LEFT(TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )&IF(ISNUMBER(FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )),MID(TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1,1),"")&IF(ISNUMBER(FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1)),MID(TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1)+1,1),"")
This comment was minimized by the moderator on the site
Thank you for this!! I had been struggling with getting initials from a last name with a space or hyphen and was able to use this formula as-is, with the addition of another IF that searched for a hyphen. A huge relief!!
This comment was minimized by the moderator on the site
I used the formula above, but if the person does not put a space between their first / last name, how do you keep that from error out?
This comment was minimized by the moderator on the site
Amazing Thank you!
This comment was minimized by the moderator on the site
hi there
I Want to sort full name in to a new format if excel cell has text character more than 25 how to show it in initials and last name
Ex 01:- name has more than 25 characters
Full Name : Mildred Dresselhaus Lene Vestergaard Hau
Show as : M.D.L Vestergaard Hau
(it may add if more initials are ther for a long name)
Ex 02:-
Full Name : Enrico Fermi
Show as : Enrico Fermi
This comment was minimized by the moderator on the site
If the text contains more than 03 words
This comment was minimized by the moderator on the site
This works!!! Thank you!
This comment was minimized by the moderator on the site
Thank you! :lol: quite useful!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations