Sabtu, 13 Oktober 2012

Mencari cell yang memiliki data validation

Pendahuluan

Data validation adalah fitur pada Excel dimana kita bisa menetapkan aturan dan batasan pada suatu cell sehingga apabila terjadi pelanggaran dari aturan / batasan akan menyebabkan data menjadi tidak valid.

Namun jika terdapat banyak cell yang menerapkan data validation, dan kita ingin mencari cell-cell tersebut. Bagaimanakah caranya ? Berikut ini adalah caranya.

Langkah Pencarian

  1. Pada sheet yang sedang aktif dan memiliki cell-cell data validation, klik tab Home pada ribbon.
  2. Pada bagian Editing klik tombol Find & Select.


  3. Dari daftar dropdown yang muncul, klik pilihan Data Validation.


  4. Hasil pencarian menunjukkan cell-cell yang memiliki validasi data (data validation) dengan highlight warna abu-abu muda. Sedangkan heading kolom / baris yang memiliki data validasi ditunjukkan dengan warna orange.


  5. Selesai.

Mencari Data Tertentu Menggunakan Data List Validation

Dalam aplikasi Excel, mungkin Anda sudah tahu dan sering menggunakan fasilitas pencarian data yang biasa Anda akses dengan menekan kombinasi tombol Ctrl+F, namun hasil pencarian tersebut hanya sekedar memindahkan penunjuk cell pada cell yang mengandung data yang dicari tersebut. Nah berdasar dari itu, tulisan saya kali ini akan berbagi tentang pencarian data menggunakan Data Validation dan sedikit sentuhan Conditional Formatting yang mana hasil dari pencarian tersebut ditampilkan lebih “terlihat”. Cara membuatnya adalah sebagai berikut :
1. Sebagai contoh, saya menggunakan data seperti berikut :
tabel data pencarian data validation












2. Di bawah judul tabel tersebut, saya akan menambahkan Data Validation berbentuk dropdown list yang nantinya digunakan untuk pencarian data dari tabel  dibawahnya. namun sebelumnya tambahkan tabel bantu untuk Data Validation yang berisi Nama Barang seperti berikut :
tabel bantu nama barang
3. Pada cell A3 isikan dengan “Cari Barang”, lalu tempatkan penunjuk cell di cell B3. Pada tab Data kategori Data Tools pilih Data Validation sehingga muncul kotak dialog Data Validation.
4. Pada list box Allow di tab Setting bagian Validation Criteria, pilih List.
5. Pada kotak isian Source isikan alamat tabel bantu yang telah dibuat tadi, yaitu H3:H11, Anda dapat mengisikan alamat tersebut dengan klik ikon disebelah kanan kotak isian Source, lalu sorot isi tabelnya dan klik kembali ikonnya. Alamat yang tertulis yaitu $H$3:$H$11 artinya itu merupakan alamat Absolut. Jika sudah Klik OK, sehingga kini cell B3 berbentuk dropdown list.
kotak dialog data validation
6. Pada tab Home kategori Sytle pilih Conditional Formatting > Manage Rules, sehingga muncul kotak dialog Conditional Formatting Rules Manager.
kotak dialog conditional formatting ruler manager
7. Klik New Rule, sehingga muncul kotak dialog New Formatting Rule, dan isikan seperti gambar berikut :
kotak dialog new formatting Rule
8. Arti dari format di atas adalah jika isi cell B3 sama dengan isi cell B6 maka cell B6 akan diberi fill warna orange. Jika sudah klik OK.
9. Pada kotak dialog Conditional Formatting Rules Manager, kotak isian Applies to isikan alamat tabel dengan cara yang sama seperti sebelumnya, seperti gambar berikut :
kotak dialog conditional formatting ruler manager applies to
10. Klik Apply dan OK.
Sekarang kita coba buktikan, pilih salah satu nama barang pada cell B3, maka yang terjadi adalah pada Record yang isi yang sama dengan cell B3 akan ditandai dengan warna orange, seperti gambar berikut :
tampilan tabel data validation
Oke, Sekian tip untuk kali ini, mudah-mudahan bermanfaat dan dapat diaplikasikan sesuai kebutuhan Anda Winking smile

Cara Mengelompokkan Data dengan Filter di MS Excel 2007

Memasukkan data setiap harinya kedalam tabel di Ms Excel, tentunya lambat laun data tersebut akan berjumlah sangat banyak. Akibatnya kita akan merasa kesulitan untuk memilah dan memilih serta mengelompokkan data berdasarkan kriteria tertentu. Seperti halnya mengelompokkan data berdasarkan alamat, mengelompokkan data berdasarkan jabatan, mengelompokkan data berdasarkan pendidikan atau lulusan dan sebagainya.
Anda bisa saja melakukan hal tersebut diatas secara manual, namun pastinya akan memakan waktu yang tidak sebentar dan energi yang tidak sedikit. Malah terkadang karena keterbatasan sebagai manusia, masih saja ada yang tertinggal tidak ikut dikelompokkan. Nah hasilnya bisa ditebak, …. Tidak maksimal.
Untuk mengatasi hal tersebut, Ms Excel terdapat fitur atau fasilitas untuk memfilter data yaitu fasilitas Filter. Dengan menggunakan fasilitas filter tersebut anda bisa saja dengan mudah mengelompokkan data berdasarkan kriteria tertentu dengan mudah dan hasilnya juga lebih akurat. Andapun bisa saja menambahkan data baru pada baris terakhir tanpa harus menampilkan data secara keseluruhan. Cara memfilter data di ms excel bisa anda ikuti langkah-langkahnya sebagai berikut :
  1. Blok kepala tabel atau judul kolom yang akan difilter. Pada gambar dibawah ini blok sel A2 sampai E2.

    blok sel di ms excel

  2. Pada ribbon home, group menu editing, klik Short & Filter kemudian pilih Filter. Atau tekan Ctrl+Shift+L

    filter di ms excel

  3. Maka pada tiap sel kepala tabel tersebut akan terlihat tanda dropdown. Klik pada salah satu sel drop down tersebut. Dalam hal ini sebagai contoh kita pilih kolom alamat, maka klik tombol drop down pada sel alamat.
  4. Pada text filter klik select all untuk menghilangkan semua tanda centang yang ada, kemudian pilih salah satu kategori yang akan anda filter. Sebagai contoh kita pilih Madiun, kemudian klik OK.

    filter data di ms excel

  5. Maka pada tabel yang nampak hanyalah data yang beralamatkan kota madiun saja, sedangkan data yang lain tidak muncul.

    mengelompokkan data di ms excel
Untuk memunculkan semua data ulangi langkah nomor 4 kemudian beri tanda centang pada semua pilihan di text filter dan klik OK. Pada saat data difilter coba perhatikan tanda dropdown pada sel atau kolom yang difilter akan berbeda dengan kolom atau sel yang lain yang tidak difilter.

Data Filter (MS Excel 2003)

Data Filter digunakan untuk menyaring dan mengelompokan data berdasarkan kreteria.
Langkah menggunakan Data Filter :
1. Blok judul/field (misal A6 sampai D6)
2. Klik menu Data
3. Sorot Filter
4. Pilih dan klik Auto Filter
5. Klik segitiga untuk menampilkan daftar yang ingin di saring
6. Pilih dan klik data yang diinginkan.

Cara memulihkan kembali dari kondisi Filter :
- Klik menu Data
- Sorot Filter
- Pilih dan klik Auto Filter
- Kembali ke keadaan semua

Cara Mengurutkan Data (Sortasi) pada MS. EXCEL 2007

Kita terkadang mendapatkan data-data yang tidak berurutan sesuai abjad dan jelas akan memakan waktu lama untuk mengurutkan secara manual. Pada program Ms. Excel disediakan fitur pengurutan menurut abjad (A ke Z) atau sebaliknya (Z ke A). setelah data yang di butuhkan di ketik pada lembar kerja Ms. Excel Berikut ini adalah caranya mengurutkannya:
1.   Pertama yaitu menselect/ memblok seluruh data yang akan diurutkan

 2.  Pilih menu Data lalu anda pilih submenu Sort. Disana ada 3 pilihan cara mengurutkan anda tinggal pilih cara yang mana yang anda perlukan berikut ilustrasinya.


Untuk mengurutkan abjad dari A – Z, dan untuk mengurutkan angka dari yang terkecil sampai yang terbesar.







Untuk mengurutkan abjad dari Z – A, dan untuk mengurutkan angka dari yang terbesar sampai yang terkecil.







Untuk pilihan lain.











setelah anda mengklik pilihan urutan yang anda perlukan maka akan keluar warning box, anda pilih saja yang kedua " continue with the current selection" dan klik Sort


Maka hasil yang akan anda dapat seperti berikut :

Jumat, 12 Oktober 2012

Mengambil data dari sheet dan file lain

Pada Excel kita dapat dengan mudah untuk mengambil data dari sheet maupun dari file lain yang tersimpan dalam bentuk Excel juga. Ini tentu sangan berguna sekali pada saat kita membutuhkan sejumlah data tertentu dari pengolahan data dari sheet ataupun file lainnya. Selain itu kita dapat mengelompokkan data dalam kriterian yang lebih sistematis dan memanggilnya sesuai kebutuhan pada file ata sheet yang baru.

Caranya untuk mengambil data dari sheet lain:
  1. Misalnya sheet yang anda aktivkan saat ini adalah Sheet2, dan anda membutuhkan data dari Sheet1 pada range G3 maka yang perlu dilakukan adalah pilih range (D2) yang ingin ditampilkan datanya (pada Sheet2) lalu ketik =Sheet1!G3, maka data pada Sheet1 di range G3 akan sama dengan data di Sheet2 range D2
  2. Dan jika anda ingin memindahkan sejumlah range dari Sheet1 ke Sheet2 anda tinggal melakukan cara diatas atau copy paste atau klik fill handlenya di D2 kemudian klik dan drag hingga range yang diinginkan (misalnya I2)
  3. Data pada Sheet2 akan selalu terhubung dengan Sheet1, sehingga setiap perubahan yang terjadi pada Sheet1 maka secara otomatis akan berubah pada Sheet2
Caranya untuk mengambil data dari file lain:
  1. Untuk mengambil data dari file lain sebenarnya hampir sama dengan penjelasan diatas (mengambil data dari sheet lain) yaitu letakkan kursor pada range yang diinginkan misal Z24, lalu ketik rumus =[data1.xlsx]Sheet1!S5. *)Selanjutnya tekan enter. penjelasanya [data1.xlsx] merupakan nama file, Sheet1 adalah nama Sheet yang kita ambil sedangkan S5 merupakan range datanya.
  2. Jika anda kesulitan untuk menentukan nama file yang akan dambil jika namanya relatif panjang maka pertama yang perlu anda lakukan adalah aktivkan kedua file (file yang akan diambil datanya dan file tempat menempatkan data baru), pada file, sheet dan range tempat dimana data akan ditempatkan anda ketik =, selanjutnya pindah kursor dan aktivkan jendela file yang akan diabil datanya lalu tentukan klik sheetnya dan range tempat data berada, kemudian tekan Enter, maka data di data2.xlsx akan sama dengan data di file data1.xlsx sesuai sheet dan range yg diinginkan.
  3. Data di file data2.xlsx ini juga terhubung langsung dengan file di data1.xlsx Jadi jika terjadi perubahan di data1.xlsx maka data di file data2.xlsx juga akan berubah

Tranfer data antar sheet satu file

Transfer Data Antar Sheet Excel

Mengambil data dari satu sheet pada Microsoft Excel adalah hal yang biasa, kali ini bagaimana mengambil data dari sheet yang lain pada file akun yang sama tanpa meggunakan copy paste. terlebih dahulu buat data contoh seperti di bawah ini dan simpan dengan nama keuangan.xlxs


Aktifkan Sheet 2 seperti diatas. Misalkan Di sel B1(selain di B1 jugaboleh) ketik rumus =sheet1!A1. seperti gambar di bawah ini, lalu tarik fill ke C1 kemudian klik dan drag lagi ke C4.


Hasilnya seperti gambar di bawah ini:

Sheet1 range A1:B4 ke data sheet2 yang kita copy saling terhubung.Anda melakukan perubahan data pada sheet1 akan mengubah data pada sheet2.
Slamat mencoba!!!

Kamis, 11 Oktober 2012

how to use excel filtering to find data firs

How to Use Excel Filtering to Find Data Fast

Many of us find Microsoft Office Excel spreadsheets very useful for compiling information about customers, products, sales revenues and other types of data. But when the volume of data in a single worksheet grows to fill dozens of columns or rows, sorting through it can be a challenge. If you want to isolate, for example, your top 10 customers in a particular region over the last six months, you might spend a long time reviewing your data entries.
Fortunately, Excel includes an easy-to-use AutoFilter to show just what you want to see and hide the rest. Filtering doesn't change your data in any way. As soon as you remove the filter, all your data reappears, exactly the same as it was before.
Here's how to use the AutoFilter tool in Excel.
On This Page
1. Make Sure the Data Type Is the Same in Each Column1. Make Sure the Data Type Is the Same in Each Column
2. Activate the AutoFilter2. Activate the AutoFilter
3. Start Filtering Data3. Start Filtering Data
4. Apply Additional Filters4. Apply Additional Filters
5. Use Advanced Filtering Techniques5. Use Advanced Filtering Techniques
6. Turn Off Filtering6. Turn Off Filtering

1. Make Sure the Data Type Is the Same in Each Column

In your worksheet, the top row of each column should have a heading that describes the contents of the column, such as "Product Number" or "Customer."
Excel_AutoFilter_1createheadingsThe data in each column should all be the same type. For instance, do not mix text in a column with numbers, or numbers in a column with dates.

2. Activate the AutoFilter

Now click inside any data cell and activate the AutoFilter by doing the following:
In Office Excel 2003, click the Data menu, point to Filter, and then click AutoFilter.
In Office Excel 2007, click the Data tab and in the Sort & Filter area click Filter.
The AutoFilter arrows now appear to the right of each column heading.
Excel_AutoFilter_2activateNote: If you select an entire column instead of a single cell before clicking the AutoFilter command, an AutoFilter arrow will appear only on the selected column, not on all columns of the data.

3. Start Filtering Data

Suppose your worksheet contains customer sales data. Each customer entry includes information about the customer's location, products they purchase, purchase dates, and revenues and profits from each purchase. Perhaps you want to view sales activity only for those customers located in the West region. Excel can help you do this.
To view only the sales activity from customers in the West region, you click the AutoFilter arrow in the column with the Region heading. When you click an AutoFilter arrow, a list is displayed. The list contains each of the items in the column, in alphabetical or numeric order, so that you can quickly find the item you want. In this instance, you scroll to West, and click it.
Excel_AutoFilter_3start-filteringWhen you click West, Excel hides all the rows on the worksheet except for those that contain that text in this column.
Excel_AutoFilter_4hiderows.png

4. Apply Additional Filters

If you want to focus on even more specific information, you can filter again on another column, and then again on another column, and so on. You can click the arrow next to any heading in any column to apply a filter.
After filtering by Region, for example, you can click the AutoFilter arrow on the Product Number column and filter that column to see only the West region customers who purchased product number 12-100.
Excel_AutoFilter_5add-filtersYou can filter columns in any order you choose. The filters are applied progressively, in the order you apply them. Each filter limits the data to which you can apply the next filter.

5. Use Advanced Filtering Techniques

Excel also enables you to perform more intricate types of filtering. Two particularly useful types are the Top 10 filter and custom filtering.
Finding the Top (or Bottom) 10 in a column
You can use the Top 10 filter on columns of numbers or dates. With Top 10 you can find either the top items or the bottom items (the smallest or largest numbers or dates). And you're not limited to finding the top 10 items or the bottom 10 items. You can choose how many items you want to see: only 1 or as many as 500. You can use Top 10 to find the highest-priced or lowest-priced products, to identify employees with the most recent hire dates, or to see the top or bottom student grades.
To use Top 10 on a column of data in Excel 2003, click on a data cell in the column and then click the column's AutoFilter arrow.
In Excel 2003, click (Top 10…) near the top of the drop down list.
In Excel 2007, click Numbered Filters and then select Top 10.
The Top 10 AutoFilter dialog box opens. In the dialog box, select either Top or Bottom. Then select a number. Finally, select either Items or Percent.
You can filter columns in any order you choose. The filters are applied progressively, in the order you apply them. Each filter limits the data to which you can apply the next filter.
Using custom filters
When you filter by choosing from the AutoFilter drop-down list, you hide everything except your single choice. If you want to see more than one selection in a column, you can create custom filters.
To create a custom filter,
In Excel 2003, click (Custom…) near the top of the drop down list.
In Excel 2007, click Numbered Filters and then click Custom Filter.
The Custom AutoFilter dialog box opens. You can now enter two filtering requirements for the column of data. For example, you could see customers who purchased product numbers 12-100 and 12-500.
Note: Be sure to select the Or button or you will see no results at all.
Excel_AutoFilter -6custom-filter

6. Turn Off Filtering

How you remove filters depends on how many filters you have applied, and from how many columns you wish to remove filters.
To remove a filter from one column, click the AutoFilter arrow next to that column, and then click All. That command will display the rows hidden by that filter.
To remove all filters at once, point to Filter on the Data menu, and then click Show All. That command will display all rows hidden by all filters on the worksheet but leave AutoFilter turned on.
To turn off AutoFilter, point to Filter on the Data menu, and then click AutoFilter.
To remove the filters from your spreadsheet, simply deselect AutoFilter (Excel 2003) or Filter (Excel 2007) on the Excel menu. All the data in the spreadsheet is revealed again.
Related Articles
Track Finances with Excel
Use KPIs to Improve Profitability
Use Excel Template to Help Capture New Business
Product Information
Office Small Business 2007
Office Professional 2007

sorting

Sort data in a range or table

Sorting data is an integral part of data analysis. You might want to put a list of names in alphabetical order, compile a list of product inventory levels from highest to lowest, or order rows by colors or icons. Sorting data helps you quickly visualize and understand your data better, organize and find the data that you want, and ultimately make more effective decisions.
 Note   To find the top or bottom values in a range of cells or table, such as top 10 grades or bottom 5 sales amounts, use AutoFilter or conditional formatting. For more information, see Filter data in a range or table and Add, change, or clear conditional formats.
What do you want to do?


Learn about sorting

You can sort data by text (A to Z or Z to A), numbers (smallest to largest or largest to smallest), and dates and times (oldest to newest and newest to oldest) in one or more columns. You can also sort by a custom list (such as Large, Medium, and Small) or by format, including cell color, font color, or icon set. Most sort operations are column sorts, but you can also sort by rows.
Sort criteria are saved with the workbook so that you can reapply the sort each time that you open the workbook for an Excel table, but not for a range of cells. If you want to save sort criteria so that you can periodically reapply a sort when you open a workbook, then it's a good idea to use a table. This is especially important for multicolumn sorts or for sorts that take a long time to create.
When you reapply a sort, different results appear for the following reasons:
  • Data has been added, modified, or deleted to the range of cells or table column.
  • Values returned by a formula have changed and the worksheet has been recalculated.
Top of Page Top of Page

Sort text

  1. Select a column of alphanumeric data in a range of cells, or make sure that the active cell is in a table column containing alphanumeric data.
  2. On the Data tab, in the Sort & Filter group, do one of the following:
    • To sort in ascending alphanumeric order, click Button Image Sort A to Z.
    • To sort in descending alphanumeric order, click Button Image Sort Z to A.
  3. Optionally, you can do a case-sensitive sort.
  1. On the Data tab, in the Sort & Filter group, click Sort.
Excel Ribbon Image
  1. In the Sort dialog box, click Options.
  2. In the Sort Options dialog box, select Case sensitive.
  3. Click OK twice.
  1. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
Issue: Check that all data is stored as text    If the column that you want to sort contains numbers stored as numbers and numbers stored as text, then you need to format them all as text. If you do not, the numbers stored as numbers are sorted before the numbers stored as text. To format all of the selected data as text, on the Home tab, in the Font group, click the Format Cell Font button, click the Number tab, and then under Category, click Text.
Issue: Remove any leading spaces     In some cases, data imported from another application might have leading spaces inserted before data. Remove the leading spaces before sorting the data.
Top of Page Top of Page

Sort numbers

  1. Select a column of numeric data in a range of cells, or make sure that the active cell is in a table column containing numeric data.
  2. On the Data tab, in the Sort & Filter group, do one of the following:
    • To sort from low numbers to high numbers, click Button Image Sort Smallest to Largest.
    • To sort from high numbers to low numbers, click Button Image Sort Largest to Smallest.
Issue: Check that all numbers are stored as numbers    If the results are not what you expected, the column might contain numbers stored as text and not as numbers. For example, negative numbers imported from some accounting systems or a number entered with a leading ' (apostrophe) are stored as text. For more information, see Convert numbers stored as text to numbers.
Top of Page Top of Page

Sort dates or times

  1. Select a column of dates or times in a range of cells, or make sure that the active cell is in a table column containing dates or times.
  2. Select a column of dates or times in a range of cells or table.
  3. On the Data tab, in the Sort & Filter group, do one of the following:
    • To sort from an earlier to a later date or time, click Button Image Sort Oldest to Newest.
    • To sort from a later to an earlier date or time, click Button Image Sort Newest to Oldest.
  4. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
Issue: Check that dates and times are stored as dates or times     If the results are not what you expected, the column might contain dates or times stored as text and not as dates or times. For Excel to sort dates and times correctly, all dates and times in a column must be stored as a date or time serial number. If Excel cannot recognize a value as a date or time, the date or time is stored as text. For more information, see Convert dates stored as text to dates.
 Note    If you want to sort by days of the week, format the cells to show the day of the week. If you want to sort by the day of the week regardless of the date, convert them to text by using the TEXT function. However, the TEXT function returns a text value, and so the sort operation would be based on alphanumeric data. For more information, see Show dates as days of the week.
Top of Page Top of Page

Sort by cell color, font color, or icon

If you have manually or conditionally formatted a range of cells or table column, by cell color or font color, you can also sort by these colors. You can also sort by an icon set created through a conditional format.
  1. Select a column of data in a range of cells, or make sure that the active cell is in a table column.
  2. On the Data tab, in the Sort & Filter group, click Sort.
Excel Ribbon Image
The Sort dialog box is displayed.
  1. Under Column, in the Sort by box, select the column that you want to sort.
  2. Under Sort On, select the type of sort. Do one of the following:
    • To sort by cell color, select Cell Color.
    • To sort by font color, select Font Color.
    • To sort by an icon set, select Cell Icon.
  3. Under Order, click the arrow next to the button, and then, depending on the type of format, select a cell color, font color, or cell icon.
  4. Under Order, select how you want to sort. Do one of the following:
    • To move the cell color, font color, or icon to the top or left, select On Top for a column sort, and On Left for a row sort.
    • To move the cell color, font color, or icon to the bottom or right, select On Bottom for a column sort, and On Right for a row sort.
 Note   There is no default cell color, font color, or icon sort order. You must define the order that you want for each sort operation.
  1. To specify the next cell color, font color, or icon to sort by, click Add Level, and then repeat steps three through five.
Make sure that you select the same column in the Then by box and that you make the same selection under Order.
Keep repeating for each additional cell color, font color, or icon that you want included in the sort.
  1. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
Top of Page Top of Page

Sort by a custom list

You can use a custom list to sort in a user-defined order. Excel provides built-in, day-of-the-week and month-of-the year custom lists, and you can also create your own custom list.
  1. Optionally, create the custom list.
  1. In a range of cells, enter the values that you want to sort by, in the order that you want them, from top to bottom. For example:
A
1 High
2 Medium
3 Low
  1. Select the range that you just typed. In the example above, you would select cells A1:A3.
  2. Click the Microsoft Office Button Button image, click Excel Options, click the Popular category, and then under Top options for working with Excel, click Edit Custom Lists.
  3. In the Custom Lists dialog box, click Import, and then click OK twice.
 Notes 
  • You can only create a custom list based on a value (text, number, and date or time). You cannot create a custom list based on a format (cell color, font color, and icon).
  • The maximum length for a custom list is 255 characters, and the first character must not begin with a number.
  1. Select a column of data in a range of cells, or make sure that the active cell is in a table column.
  2. On the Data tab, in the Sort & Filter group, click Sort.
Excel Ribbon Image
The Sort dialog box is displayed.
  1. Under Column, in the Sort by or Then by box, select the column that you want to sort by a custom list.
  2. Under Order, select Custom List.
  3. In the Custom Lists dialog box, select the list that you want. In the preceding example, you would click High, Medium, Low.
  4. Click OK.
  5. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
Top of Page Top of Page

Sort rows

  1. Select a row of data in a range of cells, or make sure that the active cell is in a table column.
  2. On the Data tab, in the Sort & Filter group, click Sort.
Excel Ribbon Image
The Sort dialog box is displayed.
  1. Click Options.
  2. In the Sort Options dialog box, under Orientation, click Sort left to right, and then click OK.
  3. Under Column, in the Sort by box, select the row that you want to sort.
  4. Do one of the following:
By value    
  1. Under Sort On, select Values.
  2. Under Order, do one of the following:
    • For text values, select A to Z or Z to A.
    • For number values, select Smallest to Largest or Largest to Smallest.
    • For date or time values, select Oldest to Newest or Newest to Oldest.
By cell color, font color, or cell icon    
  1. Under Sort On, select Cell Color, Font Color, or Cell Icon.
  2. Click the arrow next to the button, and then select a cell color, font color, or cell icon.
  3. Under Order, select On Left or On Right.
  1. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
 Note    When you sort rows that are part of a worksheet outline, Excel sorts the highest-level groups (level 1) so that the detail rows or columns stay together, even if the detail rows or columns are hidden.
Top of Page Top of Page

Sort by more than column or row

You might sort by more than one column or row when you have data that you want to group by the same value in one column or row, and then sort another column or row within that group of equal values. For example, if you have a Department and Employee column, you can first sort by Department (to group all the employees in the same department together), and then sort by name (to put the names in alphabetical order within each department). You can sort by up to 64 columns.
 Note   For best results, the range of cells that you sort should have column headings.
  1. Select a range of cells with two or more columns of data, or make sure that the active cell is in a table with two or more columns.
  2. On the Data tab, in the Sort & Filter group, click Sort.
Excel Ribbon Image
The Sort dialog box is displayed.
  1. Under Column, in the Sort by box, select the first column that you want to sort.
  2. Under Sort On, select the type of sort. Do one of the following:
    • To sort by text, number, or date and time, select Values.
    • To sort by format, select Cell Color, Font Color, or Cell Icon.
  3. Under Order, select how you want to sort. Do one of the following:
    • For text values, select A to Z or Z to A.
    • For number values, select Smallest to Largest or Largest to Smallest.
    • For date or time values, select Oldest to Newest or Newest to Oldest.
    • To sort based on a custom list, select Custom List.
  4. To add another column to sort by, click Add Level, and then repeat steps three through five.
  5. To copy a column to sort by, select the entry, and then click Copy Level.
  6. To delete a column to sort by, select the entry, and then click Delete Level.
 Note   You must keep at least one entry in the list.
  1. To change the order in which the columns are sorted, select an entry, and then click the Up or Down arrow to change the order.
Entries higher in the list are sorted before entries lower in the list.
  1. To reapply a sort after you change the data, click a cell in the range or table, and then on the Data tab, in the Sort & Filter group, click Reapply.
Top of Page Top of Page

Sort by a partial value in a column

Sorting is based on the entire value in a column. If you want to sort by part of a value in a column, such as a part number code (789-WDG-34), last name (Carol Philips), or first name (Philips, Carol), you first need to split the column into two or more columns so that the value you want to sort by is in its own column. To do this, you can use functions or the Convert Text to Columns Wizard.
For examples and more information, see Split names by using the Convert Text to Columns Wizard and Split text among columns by using functions.
Top of Page Top of Page

Sort one column in a range of cells without affecting the others

 Warning    Be careful when using this feature. Sorting by one column in a range may produce results that you don't want, such as moving cells in that column away from other cells in the same row.
 Note   You cannot do the following procedure in a table.
  1. Select a column in a range of cells containing two or more columns.
  2. To select the column that you want to sort, click the column heading.
  3. On the Home tab, in the Editing group, click Sort & Filter, and then click one of the available sort commands.
  4. The Sort Warning dialog box is displayed.
  5. Select Continue with the current selection.
  6. Click Sort.
  7. Select any other sort options that you want in the Sort dialog box, and then click OK.
If the results are not what you want, click Undo Undo button.
Top of Page Top of Page

Learn more about general issues with sorting

If you get unexpected results when sorting your data, do the following:
Check to see if the values returned by a formula have changed     If the data that you have sorted contains one or more formulas, the return values of those formulas can change when the worksheet is recalculated. In this case, make sure that you reapply the sort or do the sort again to get up-to-date results.
Unhide rows and columns before you sort     Hidden columns are not moved when you sort columns, and hidden rows are not moved when you sort rows. Before you sort data, it's a good idea to unhide the hidden columns and rows.
Check the locale setting     Sort orders vary by locale setting. Make sure that you have the proper locale setting in Regional Settings or Regional and Language Options in Control Panel on your computer. For information about changing the locale setting, see the Windows help system.
Enter column headings in only one row     If you need multiple line labels, wrap the text within the cell.
Turn on or off the heading row    It's usually best to have a heading row when you sort a column to make it easier to understand the meaning of the data. By default, the value in the heading is not included in the sort operation. Occasionally, you may need to turn on or off the heading so that the value in the heading is or is not included in the sort operation. Do one of the following:
  • To exclude the first row of data from the sort because it is a column heading, on the Home tab, in the Editing group, click Sort & Filter, click Custom Sort, and then select My data has headers.
  • To include the first row of data in the sort because it is not a column heading, on the Home tab, in the Editing group, click Sort & Filter, click Custom Sort, and then clear My data has headers.