Computer >> คอมพิวเตอร์ >  >> ซอฟต์แวร์ >> Office

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

การจัดรูปแบบตามเงื่อนไข เป็นคุณลักษณะที่ต้องใช้ของ Microsoft Excel เพื่อการวิเคราะห์ทางสถิติและการแสดงภาพข้อมูลที่ดีขึ้น ฟีเจอร์นี้ใช้เป็นหลักในการเน้นเซลล์ในชุดข้อมูลตามเงื่อนไขต่างๆ เงื่อนไขเหล่านี้จัดอยู่ในกฎการจัดรูปแบบประเภทต่างๆ ในบทความนี้ เราจะแสดงวิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

คุณสามารถดาวน์โหลด Excel . ได้ฟรี สมุดงานที่นี่และฝึกฝนด้วยตัวเอง

การจัดรูปแบบตามเงื่อนไข 5 ประเภทใน Excel

ในบทความนี้ คุณจะเห็นการจัดรูปแบบตามเงื่อนไขห้าประเภทใน Excel ประเภทเหล่านี้คือ- เน้นกฎของเซลล์ , กฎด้านบนและด้านล่าง , แถบข้อมูล , สเกลสี และ ชุดไอคอน . ภายใต้ประเภทเหล่านี้ มีบางประเภทย่อย เราจะอธิบายประเภทและการใช้งานทั้งหมดในส่วนที่เกี่ยวข้อง

เพื่ออธิบายขั้นตอนเพิ่มเติม เราจะใช้ชุดข้อมูลต่อไปนี้ ที่นี่ในคอลัมน์ B เรามีวันที่สุ่มอยู่ในคอลัมน์ C สุ่มชื่อบางส่วน และคอลัมน์ D มีกำไรที่ได้รับในวันนั้น เราจะนำเงื่อนไขการจัดรูปแบบทั้งหมดไปใช้กับชุดข้อมูลโดยขึ้นอยู่กับเกณฑ์เงื่อนไข

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1. เน้นกฎของเซลล์

ประเภทแรกของการจัดรูปแบบตามเงื่อนไขทั้งห้าประเภทใน Excel คือ ไฮไลต์กฎของเซลล์ . ภายใต้ประเภทนี้ เราจะให้เงื่อนไขบางอย่าง และการนำเสนอของเซลล์จะเปลี่ยนแปลงไปตามเงื่อนไขเหล่านี้

1.1 ค่าของเซลล์มีค่ามากกว่าค่าเฉพาะ

ที่นี่ เราจะจัดรูปแบบเซลล์ตามเงื่อนไขที่มากกว่า เราจะตั้งค่าเฉพาะและจะดูจำนวนเซลล์ที่มากกว่าค่านั้น โดยทำตามขั้นตอนต่อไปนี้

ขั้นตอนที่ 1:

  • ก่อนอื่น เลือกช่วงเซลล์ D5:D12 .
  • จากนั้น จาก Home ของริบบอน เลือก การจัดรูปแบบตามเงื่อนไข .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • ประการที่สอง หลังจากเลือกคำสั่งก่อนหน้า คุณจะเห็นเมนูแบบเลื่อนลงพร้อม การจัดรูปแบบตามเงื่อนไข ประเภทหลักทั้งหมด ในนั้น
  • จากนั้น เลือก ไฮไลต์กฎของเซลล์ เพื่อดูเมนูแบบเลื่อนลงที่สอง
  • จากนั้น เลือก มากกว่า .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 3:

  • ประการที่สาม คุณจะเห็น ยิ่งใหญ่กว่า กล่องโต้ตอบ
  • จากนั้น ตั้งค่าสำหรับการเปรียบเทียบ
  • ในตัวอย่างของเรา เราจะเน้นเซลล์ที่มีค่ามากกว่า 250 .
  • จากนั้น เซลล์ที่มีค่ามากกว่าจะถูกเน้นหลังจากตั้งค่าเกณฑ์
  • จากนั้นกด ตกลง เพื่อปิดกล่องโต้ตอบ

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 4:

  • ประการที่สี่ ผลลัพธ์สุดท้ายของขั้นตอนนี้จะมีลักษณะเหมือนภาพต่อไปนี้

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.2 ค่าเซลล์น้อยกว่าค่าเฉพาะ

ส่วนนี้เป็นหัวข้อย้อนกลับของหัวข้อก่อนหน้า ที่นี่ เราจะเน้นเซลล์ที่มีค่าน้อยกว่าค่าใดค่าหนึ่ง ทำตามขั้นตอนต่อไปนี้เพื่อเรียนรู้เพิ่มเติม

ขั้นตอนที่ 1:

  • ก่อนอื่น หลังจากเลือกช่วงเซลล์แล้ว ให้ไปที่ตัวเลือกที่สองของไฮไลต์กฎของเซลล์ นั่นคือ น้อยกว่า .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • ประการที่สอง น้อยกว่า กล่องโต้ตอบจะปรากฏขึ้น
  • จากนั้น เราจะแก้ไขค่าสำหรับการเปรียบเทียบ
  • ที่นี่ เราจะเน้นเซลล์ที่มีค่าน้อยกว่า 300 .
  • หลังจากไฮไลต์แล้ว ให้กด ตกลง เพื่อปิดกล่อง

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.3 ค่าเซลล์ระหว่างสองค่า

เกณฑ์การเน้นสีที่สามของเราจะเป็นค่าของเซลล์ที่อยู่ระหว่างสองค่าที่กำหนด วิธีเน้นสีมีให้ในขั้นตอนต่อไปนี้

ขั้นตอนที่ 1:

  • ก่อนอื่น ไปที่ ระหว่าง สภาพจาก ไฮไลต์กฎเซลล์ หลังจากเลือกช่วงเซลล์แล้ว D5:D12 .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • ประการที่สอง ในกล่องโต้ตอบชุดค่าสองค่า สำหรับการแสดงเซลล์ที่ไฮไลต์ซึ่งจะอยู่ระหว่างค่าเหล่านั้น
  • ในตัวอย่างของเรา เราจะเน้นเซลล์ที่อยู่ระหว่าง 200 และ 600 .
  • สุดท้าย กด ตกลง เพื่อปิดกล่องโต้ตอบ

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.4 ค่าเซลล์เท่ากับค่าเฉพาะ

เป้าหมายของส่วนนี้คือการเน้นเซลล์บางเซลล์ที่เท่ากับค่าหนึ่งๆ ขั้นตอนของขั้นตอนนี้มีดังนี้

ขั้นตอนที่ 1:

  • ขั้นแรก เลือกช่วงเซลล์ D5:D12 แล้วเลือก เท่ากับ จาก ไฮไลต์กฎเซลล์ .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • จากนั้น ในกล่องโต้ตอบ ให้ตั้งค่าเพื่อดูค่าที่ตรงกันในชุดข้อมูล
  • ที่นี่ เราจะเน้นเซลล์ที่เท่ากับ 350 .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.5 เซลล์ที่มีข้อความเฉพาะ

เงื่อนไขก่อนหน้านี้ทั้งหมดของเราขึ้นอยู่กับตัวเลขหรือค่า แต่ในส่วนนี้ เราจะแสดงวิธีค้นหาข้อความเฉพาะโดยใช้การจัดรูปแบบตามเงื่อนไข หากต้องการเรียนรู้เพิ่มเติมเกี่ยวกับเรื่องนี้ ให้ทำตามขั้นตอนต่อไปนี้

ขั้นตอนที่ 1:

  • ก่อนอื่น เลือกช่วงเซลล์ C5:C12 .
  • จากนั้น เลือก ข้อความที่มี จาก ไฮไลต์กฎเซลล์ ดรอปดาวน์

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • ประการที่สอง ข้อความที่มี กล่องโต้ตอบจะปรากฏขึ้น
  • จากนั้น ในกล่องประเภท ให้พิมพ์ข้อความจากชุดข้อมูล
  • หลังจากพิมพ์ ข้อความจะถูกเน้นในชุดข้อมูล
  • สุดท้าย กด ตกลง เพื่อปิดกล่อง

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.6 เซลล์ที่มีวันที่เฉพาะ

ในส่วนนี้ เราจะนำบางส่วนเกี่ยวกับวันที่ไปใช้ในชุดข้อมูล How you can highlight particular dates in your data set is given in the following steps.

ขั้นตอนที่ 1:

  • Firstly, select the cell range that contains dates, which is B5:B12 .
  • Then, from the Highlight Cells Rules dropdown, choose A Date Occurring .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, in the dialog box, set the rule for highlighting cells that contain dates from the previous month.
  • As a result, in cell range B5:B12 , only the previous month’s dates will be highlighted.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

1.7 Duplicate Cell Values

The last condition of the Highlight Cells Rules deals with finding duplicate values from the data set. If you want to highlight duplicate values, then you can follow the steps given below.

ขั้นตอนที่ 1:

  • Firstly, select the cell range where you want to put the condition.
  • Then, select Duplicate Values from the dropdown.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, after selecting the command, the duplicate values from the cell will be highlighted automatically.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

อ่านเพิ่มเติม: Excel Highlight Cell If Value Greater Than Another Cell (6 Ways)

2. Top and Bottom Rules

The Top and Bottom Rules are the second type of Conditional Formatting ใน Excel If you want to highlight the highest or lowest value from your data set or want to figure out the top or bottom percentage of data, then this type is the best choice for doing so.

2.1 Top Values from Data Set

Sometimes, users want to show the topmost values in their given data for analysis. The below-given steps of this procedure describe how you can apply this condition.

ขั้นตอนที่ 1:

  • Firstly, take the following data set for applying the condition.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, select the cell range D5:D12 .
  • Then, in the Home tab, choose the second type of Conditional Formatting which is Top/Bottom Rules .
  • From the rules, select Top 10 Items .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 3:

  • Secondly, a dialog box will appear in which you can manually input the number of top values.
  • As our data set contains fewer than 10 items, we will highlight the top 5 values in the data set.
  • Finally, this condition will highlight the top 5 values from our data set.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

2.2 Top 10% Values from Data Set

If you want to highlight how many values from your data set belong to the top 10 percent of the whole data set, then you can apply this condition. For the detailed procedure, follow the below-given steps.

ขั้นตอนที่ 1:

  • In the beginning, select the cell range D5:D12 .
  • Then, choose Top 10% from the Top/Bottom Rules .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, set the highlight condition to see cells that fall in the top 10% of the total value.
  • Then, it will show cell D5 that is $500 , which fulfills the given condition.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

2.3 Bottom Values from Data Set

For the third criterion of this type, we will highlight the bottommost values of a data set. Now, see the following steps to get a clear view.

ขั้นตอนที่ 1:

  • First of all, select the data range to apply the condition.
  • Then, choose the Bottom 10 Items from the dropdown.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, fixed the number of bottom values to be shown.
  • Then, the highlighted cells in the data set will represent the bottom 5 values.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

2.4 Bottom 10% Values from Data Set

In section 2.2 , you have seen the use of the Top 10% Value condition on a given data set. Here, we will show the reverse of this condition. To learn more about this see the following steps.

ขั้นตอนที่ 1:

  • In the beginning, select the data set where you want to apply the condition.
  • Then, go to the Top/Bottom Rules dropdown and choose Bottom 10% .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, insert the desired percentage in the type box.
  • After that, the value that matches the given criteria will be highlighted in the data set.
  • Here, $100 matches the criteria for the bottom 10% of the whole data set.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

2.5 Above Average Values of Data Set

You can also highlight cell values based on the average of the total cell value in conditional formatting. To highlight the above-average values of a data set, follow the below-given steps.

ขั้นตอนที่ 1:

  • In the beginning, after selecting the desired cell range, go to the Above Average condition from the Top/Bottom Rules ดรอปดาวน์

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, after applying the condition, the desired values will be highlighted automatically.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

2.6 Below Average Values of Data Set

Now, we will find the below-average values of a data set, which is the last condition of the Top/Bottom Rules . For a better understanding, see the following steps.

ขั้นตอนที่ 1:

  • First of all, after selecting the required data range, go to the Below Average command from the dropdown.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, the data that fall under the applied condition will be highlighted from the data set.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

อ่านเพิ่มเติม: Excel Conditional Formatting Formula

3. Data Bars

This is the third of the five types of conditional formatting in Excel. If you want to compare the numerical values in your data set, then this condition will be an ideal choice. Based on the cell values, this condition will create bars that will portray both positive and negative values. You can find the detailed steps in the following.

ขั้นตอนที่ 1:

  • First of all, to apply this condition, we will use the following data set.
  • Here, in the profit column, we have taken some negative values for a better presentation.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, from the Conditional Formatting dropdown, select Data Bars .
  • Then, you will see many preexisting designs for this condition.
  • After that, choose any of them as per your choice.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 3:

  • Thirdly, the selected data range will look like the following image.
  • Here, the positive values will be highlighted in green and the negative values will be displayed in red.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

อ่านเพิ่มเติม: How to Do Conditional Formatting for Multiple Conditions (8 Ways)

การอ่านที่คล้ายกัน

  • Excel สลับสีแถวด้วยการจัดรูปแบบตามเงื่อนไข [วิดีโอ]
  • How to Make Negative Numbers Red in Excel (4 Easy Ways)
  • How to Compare Two Columns in Excel For Finding Differences
  • 4 Quick Excel Formula to Change Cell Color Based on Date
  • Copy Conditional Formatting in Excel

4. Color Scales

The fourth of the five types of conditional formatting is Color Scales . It displays the disposal of data in the data set. You can mix two colors or three colors on the scale. The topmost color will represent the greater values , the middle scale will represent the average values, and the bottom color scale will represent the lower values in a data set. To learn more about the procedure, go through the following steps.

ขั้นตอนที่ 1:

  • First of all, select the required data range and go to the Color Scales dropdown from Conditional Formatting .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, from the Color Scales dropdown, select More Rules .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 3:

  • Thirdly, in the dialog box, choose 3-Color Scale as the Format Style .
  • Then, in the Type box, select Lowest Value as Minimum and Highest Value as Maximum .
  • Here, the lower values will have the red color scale, the middle values will have the green color scale and finally, the higher values will have the green color scale.
  • Lastly, press OK .

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 4:

  • Finally, after setting all the conditions, your data set will look like the following picture.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

อ่านเพิ่มเติม: Excel Formula to Change Text Color Based on Value (+ Bonus Methods)

5. Icon Sets

The last type of the five types of conditional formatting is the Icon Sets . This type also works as in the previous two examples. This condition implements icons in the selected cell range based on their cell values. The steps for the last procedure of this article are given below.

ขั้นตอนที่ 1:

  • First of all, select the Icon Sets command from the Conditional Formatting dropdown after choosing the required data range.
  • Here, you will see many designs of Icon Sets .
  • Consequently, choose any of the designs to apply.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

ขั้นตอนที่ 2:

  • Secondly, the data set will look like the following picture after applying the preferred icons.
  • Here, the red icons represent the lower values, the yellow icons represent the middle values, and the green icons represent the higher values of the data set.

วิธีการใช้การจัดรูปแบบตามเงื่อนไขประเภทต่างๆ ใน ​​Excel

อ่านเพิ่มเติม: Excel Conditional Formatting Text Color (3 Easy Ways)

บทสรุป

That’s the end of this article. We hope you find this article helpful. After reading the above description, you will be able to apply different types of conditional formatting in Excel by reading the above description. Please share any further queries or recommendations with us in the comments section below.

The ExcelDemy team is always concerned about your preferences. Therefore, after commenting, please give us a moment to solve your issues, and we will reply to your queries with the best possible solutions ever.

บทความที่เกี่ยวข้อง

  • Apply Conditional Formatting to the Overdue Dates in Excel (3 Ways)
  • Conditional Formatting with INDEX-MATCH in Excel (4 Easy Formulas)
  • Pivot Table Conditional Formatting Based on Another Column (8 Easy Ways)
  • Excel Conditional Formatting Based on Date Range
  • Conditional Formatting on Text that Contains Multiple Words in Excel
  • Apply Conditional Formatting to Each Row Individually:3 Tips