ไปยังเนื้อหาหลัก

 จะส่งคืนเซลล์แรก / เซลล์สุดท้ายที่ไม่ว่างในแถวหรือคอลัมน์ได้อย่างไร

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

ส่งคืนเซลล์ที่ไม่ใช่เซลล์แรกในแถวหรือคอลัมน์ด้วยสูตร

ส่งคืนเซลล์สุดท้ายที่ไม่ว่างในแถวหรือคอลัมน์ด้วยสูตร


ลูกศรสีฟ้าฟองขวา ส่งคืนเซลล์ที่ไม่ใช่เซลล์แรกในแถวหรือคอลัมน์ด้วยสูตร

ในการแยกเซลล์แรกด้วยข้อมูลโปรดใช้สูตรต่อไปนี้:

1. ป้อนสูตรต่อไปนี้ลงในเซลล์ว่างนอกเหนือจากข้อมูลของคุณ: =INDEX(A1:A13,MATCH(TRUE,INDEX((A1:A13<>0),0),0))ดูภาพหน้าจอ:

doc-return-first-data-cell-1

2. จากนั้นกด เข้าสู่ และคุณจะได้รับค่าเซลล์แรกที่ไม่ว่างดังต่อไปนี้:

doc-return-first-data-cell-1

หมายเหตุ:

1. ในสูตรข้างต้น A1: A13 คือช่วงคอลัมน์ที่คุณต้องการใช้คุณสามารถเปลี่ยนได้ตามต้องการ สูตรนี้ยังสามารถใช้เพื่อรับค่าเซลล์แรกที่ไม่ว่างในแถวคุณเพียงแค่เปลี่ยนช่วงคอลัมน์เป็นช่วงแถว

2. สูตรนี้ทำงานได้อย่างถูกต้องในแถวเดียวหรือคอลัมน์เดียว


ลูกศรสีฟ้าฟองขวา ส่งคืนเซลล์สุดท้ายที่ไม่ว่างในแถวหรือคอลัมน์ด้วยสูตร

หากคุณต้องการส่งคืนค่าเซลล์สุดท้ายที่ไม่ว่างนี่คือสูตรอื่นที่สามารถช่วยคุณได้

1. พิมพ์สูตรนี้ =LOOKUP(2,1/(A1:A13<>""),A1:A13) ลงในเซลล์ว่างนอกเหนือจากข้อมูลของคุณดูภาพหน้าจอ:

doc-return-first-data-cell-1

2. จากนั้นกด เข้าสู่ คีย์ค่าเซลล์สุดท้ายที่ไม่ว่างจะถูกแยกออกพร้อมกัน ดูภาพหน้าจอ:

doc-return-first-data-cell-1

หมายเหตุ:

1. ในสูตรข้างต้น A1: A13 คือช่วงคอลัมน์ที่คุณต้องการใช้คุณสามารถเปลี่ยนได้ตามต้องการ สูตรนี้ยังสามารถใช้เพื่อรับค่าเซลล์สุดท้ายที่ไม่ว่างในแถวคุณเพียงแค่ต้องเปลี่ยนช่วงคอลัมน์เป็นช่วงแถว

2. สูตรข้างต้นทำงานได้อย่างถูกต้องในแถวเดียวหรือคอลัมน์เดียว

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (31)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How do i use this formula to return the columns header of the first cell with a value >0 ?
This comment was minimized by the moderator on the site
Hello, Tom,
To solve your problem, please apply the below formula:
=INDEX($B$1:$H$1,MATCH(TRUE,$B2:$H2>0,0))
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-return-column-headers.png

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Como faço para obter o menor valor de um intervalo, onde pode haver células em branco ?
This comment was minimized by the moderator on the site
Thank you so much for your content! I don't know what I'm doing wrong but I can't seem to be able to do this (in Google sheets) :

I need to fill H1 with the value from the first non-empty cell from C1 to G1. Then I need to copy this for all next rows (H2, H3, H4 etc)

Thanking you in advance for your time, it would be very appreciated :)
This comment was minimized by the moderator on the site
Hi, Marissa,
If you want to get the first non blank value from a row in Google sheets, please apply any one of the following formulas:

=QUERY(transpose(C1:G1),"Select Col1 where Col1 is not null limit 1",0)
=index(C1:G1,MATCH(FALSE,ISBLANK(C1:G1),0))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Perfect answer. Have been looking for this for quite some time. Thank you!
This comment was minimized by the moderator on the site
Hi
I want to return the first non blank cell in a row but rather that with
information in top cell of the fist nin blank cell.
This comment was minimized by the moderator on the site
It works to find last non blank cell that has more than 255 characters, also. Helpful for me to solve issue.
Thanks a lot !
This comment was minimized by the moderator on the site
A1:A13<>0 returns an array of value that are either true or false
all values that are not 0 (eg <>0) in A1:A13 become true, and all else become false
So now you can look up the first 'true' in that array and use it to index
This comment was minimized by the moderator on the site
What does "INDEX((A1:A13<>0)" mean? The first parameter to INDEX is the set of cells A1 through A13 but with a test for not equal to zero appended. I can't find any explanation of this.
This comment was minimized by the moderator on the site
Hi can someone helpme on this,

I have a csv file or maybe a excel which has n number of data's in it from which i need few collective data's using formulas which should be automatic,and i need the output to be in a table form.can please anyone helpme on this??
This comment was minimized by the moderator on the site
I would really love to know why ,1/([RANGE]<>0) works :(
This comment was minimized by the moderator on the site
How To Return The Last Non Blank Cell from some selected cells In A Row
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