:D snasui.com ยินดีต้อนรับ :D
ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย :thup: สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ :arrow: ระบุ Version ของ Excel
:!: โปรดทราบ :!:
  1. กรุณาอ่านกฎการใช้บอร์ด (Forum rules) ในตำแหน่งด้านบนของแต่ละบอร์ด
  2. การสมัครสมาชิก การ Login การกู้คืนรหัสผ่าน
    1. สมัครสมาชิกดูขั้นตอนได้ที่ :arrow: สมัครสมาชิก
    2. Login เข้าระบบโดยคลิกปุ่ม Login ตรงมุมขวาบนของหน้านี้ :roll:
    3. การ Login ผ่าน Facebook ดูวิธีที่ :arrow: Login ผ่าน Facebook
    4. ลืมรหัสผ่านสามารถรับรหัสใหม่ได้ที่ :arrow: Reset รหัสผ่าน
  3. มีปัญหาการใช้งาน แจ้งผู้ดูแลระบบได้ที่ :arrow: ติดต่อผู้ดูแลระบบ
  4. กำหนดการตั้งค่าส่วนตัว เช่นตั้งค่าภาษาเป็นไทยหรืออังกฤษดูได้ที่ :arrow: ตั้งค่าส่วนตัว
  5. การตั้งและตอบกระทู้ดูได้ที่ :arrow: วิธีการตั้งและตอบกระทู้
  6. การจัดรูปแบบตัวอักษรด้วย bbcode ในช่องแสดงความคิดเห็นดูได้ที่ :arrow: จัดรูปแบบตัวอักษร
  7. กำหนดขนาดตัวอักษรใน Browser ดูได้ที่ :arrow: กำหนดขนาดตัวอักษรใน Browser

index function

ฟอรัมถาม-ตอบปัญหาการใช้งานสูตรและฟังก์ชัน Excel
Forum rules
  1. ไม่อนุญาตให้ใช้ภาษาแชทในการถามและตอบปัญหา ไม่ใช้คำว่า "คับ" หรือ "อ่ะครับ" แทนคำว่า "ครับ" ไม่ใช้คำว่า "เด๋ว" แทนคำว่า "เดี๋ยว" เป็นต้น เนื่องจากเมื่อแปลเป็นภาษาต่างประเทศแล้วจะให้ความหมายผิดไปจากที่ควรจะเป็น
  2. ห้ามถามโดยระบุชื่อผู้ตอบและต้องตั้งชื่อกระทู้ให้สื่อถึงปัญหาที่จะถาม ไม่ตั้งชื่อว่า ช่วยด้วยครับ, มีปัญหามาปรึกษาครับ เป็นต้น
  3. กรุณาอธิบายปัญหาและระบุคำตอบที่ต้องการมาในกระทู้ด้วยเสมอถึงแม้จะอธิบายไว้ในไฟล์แนบแล้วก็ตาม ทั้งนี้เพื่ออำนวยความสะดวกแก่เพื่อนสมาชิกในการค้นหาข้อมูล
  4. กรุณาแนบไฟล์ตัวอย่างพร้อมแสดงคำตอบที่ถูกต้องมาในไฟล์ด้วยเพื่อให้ง่ายต่อการทำความเข้าใจและสะดวกต่อการตอบคำถาม (ขนาดไฟล์ไม่เกิน 500Kb ขนาดภาพไม่เกิน 800*600 Pixel) ไม่แนบเป็น Link มาจากแหล่งอื่นที่อาจจะถูกลบทิ้งไปโดยต้นทางในภายหลัง นอกจากนี้ไม่ควรแนบไฟล์ที่มีข้อมูลสำคัญอันก่อให้เกิดความเสียหายกับตนเองและผู้อื่น
  5. กรณีเป็นคำถามเกี่ยวกับ Programming เช่น VBA, VB.Net, C#, SQL ฯลฯ ต้องลองเขียนมาเองก่อนเสมอ ถามเฉพาะที่ติดปัญหา ระบุ Module, Procedure ที่ติดปัญหาให้ชัดเจน กรุณาโพสต์ Code ให้แสดงเป็น Code คือเปิดด้วย [code] และปิดด้วย [/code] ตัวอย่างเช่น [code]dim r as range[/code] เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)
  6. กรุณาแจ้งผลการใช้งานเมื่อได้รับคำตอบว่าตรงกับความต้องการหรือไม่
sna
Silver
Silver
Posts: 721
Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365

index function

#1

Post by sna »

Hi Dear

I need to lookup value and return value from adjacent cell but only unique

Note: need only formula

I attached a template

Best Wishes,
You do not have the required permissions to view the files attached to this post.
User avatar
norkaz
Gold
Gold
Posts: 1826
Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365

Re: index function

#2

Post by norkaz »

..

It could be possible and properly to use the formulas that place E2:G5 as attached.

Try this, if you need another way.


I2
=IFERROR(INDEX($A$1:$A$16,AGGREGATE(15,6,ROW($A$1:$A$16)/($A$1:$A$16<>""),ROW(A1))),"")

Copy down.

J2
=IFERROR(INDEX($B$1:$B$16,AGGREGATE(15,6,ROW($B$1:$B$16)/(LOOKUP(ROW($A$1:$A$16),ROW($A$1:$A$16)/($A$1:$A$16<>""))=MATCH($I2,$A$1:$A$16,0)/($B$1:$B$16<>"")),COLUMNS($J$2:J2))),"")

Copy down and to the right hand side.


Norkaz
You do not have the required permissions to view the files attached to this post.
sna
Silver
Silver
Posts: 721
Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365

Re: index function

#3

Post by sna »

Hi Norkaz,

In J2 not what I need .
In should return unique subject by student name like below
Sharmin English Math
Mahi English
Mahiha Math English Physique
Arifa Math English French


Best Wishes
User avatar
norkaz
Gold
Gold
Posts: 1826
Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365

Re: index function

#4

Post by norkaz »

Hi Guy,

Please give me any info for more clarify about your points.

If my understand is correct, refer to your first attached you don't need the formulas E2:G5 but you need only "ONE FORMULA" that place D2 and then copy to the right hand side and down , then the results would be as appeared as attached, right?

Norkaz
User avatar
norkaz
Gold
Gold
Posts: 1826
Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365

Re: index function

#5

Post by norkaz »

D2

=IFERROR(INDEX(INDEX($A$1:$B$16,0,MIN(COLUMNS($D$2:D2),2)),IF(AGGREGATE(15,6,ROW($A$1:$A$16)/($A$1:$A$16<>""),ROW(A1))+COLUMNS($D$1:D1)-1>IFERROR(AGGREGATE(15,6,ROW($A$1:$A$16)/($A$1:$A$16<>""),ROW(D2))-1,AGGREGATE(14,6,ROW($A$1:$A$16)/($B$1:$B$16<>""),1)),"",AGGREGATE(15,6,ROW($A$1:$A$16)/($A$1:$A$16<>""),ROW(D1))+COLUMNS($D$2:D2)-1)),"")&""

Copy to right hand side and down.

Norkaz
You do not have the required permissions to view the files attached to this post.
sna
Silver
Silver
Posts: 721
Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365

Re: index function

#6

Post by sna »

Dear Norkaz

I mean that every subject come from student name is unique.(unique subject)

Like student name Mahi is subject to return is only English once time not three times.


Best Wishes
User avatar
norkaz
Gold
Gold
Posts: 1826
Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365

Re: index function

#7

Post by norkaz »

E2

=IFERROR(INDEX($B$1:$B$16,AGGREGATE(15,6,INDEX(ROW($B$1:$B$16)/(MATCH($D2&$B$1:$B$16,LOOKUP(ROW($A$1:$A$16),ROW($A$1:$A$16)/($A$1:$A$16<>""),$A$1:$A$16)&$B$1:$B$160,0)=ROW($A$1:$A$16)/($B$1:$B$16<>"")),0),COLUMNS($D$2:D2))),"")

Ctrl + Shift + Enter

Norkaz
You do not have the required permissions to view the files attached to this post.
sna
Silver
Silver
Posts: 721
Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365

Re: index function

#8

Post by sna »

Thank you it's working now
User avatar
norkaz
Gold
Gold
Posts: 1826
Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365

Re: index function

#9

Post by norkaz »

sna wrote: Mon May 24, 2021 7:35 pm Dear Norkaz

I mean that every subject come from student name is unique.(unique subject)

Like student name Mahi is subject to return is only English once time not three times.


Best Wishes

Hi friend

A common problem.

Misunderstandings happen all the time, especially when communication is not clear. And can cost too much time.

One solution that works for many people is just only place the text sample (no need with the formula(s)) ,probably place 2-3 simply answers text values
" WITH THE COLOR HIGHLIGHT" in the template attached would be helpful.

This way might be able to help us save our time together and communicate clearly to find out the right solutions related to the Excel questions from the forum members -- and give you more helpful answer. :)

A sample as Excel attached.

I'd be happy to help.

Kind regards,
Norkaz
You do not have the required permissions to view the files attached to this post.
User avatar
logic
Gold
Gold
Posts: 1511
Joined: Thu Mar 18, 2010 1:57 pm
Excel Ver: 365

Re: index function

#10

Post by logic »

norkaz wrote: Tue May 25, 2021 9:11 am just only place the text sample (no need with the formula(s)) ,probably place 2-3 simply answers text values
" WITH THE COLOR HIGHLIGHT" in the template attached would be helpful.
:thup: :thup: :thup: Strongly agree.
sna
Silver
Silver
Posts: 721
Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365

Re: index function

#11

Post by sna »

Noted thanks
Post Reply