snasui.com ยินดีต้อนรับ
ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
คำแสดงเจตนา
ขอผลแห่งการให้ความรู้นี้ จงกลับไปยังผู้ที่เป็นเจ้าของเดิม แม้ข้าพเจ้าจะไม่รู้จักท่านก็ตาม ขอให้แสงแห่งปัญญาที่ท่านเคยจุดไว้ ได้กลับไปเติมเต็มชีวิตของท่านอีกครั้ง และขอให้เจตนาของข้าพเจ้าเป็นการคืนความดีอย่างสงบ
ฟอรัมถาม-ตอบปัญหาการใช้งาน MS Excel and VBA
Forum rules
ไม่อนุญาตให้ใช้ภาษาแชทในการถามและตอบปัญหา ไม่ใช้คำว่า "คับ" หรือ "อ่ะครับ" แทนคำว่า "ครับ" ไม่ใช้คำว่า "เด๋ว" แทนคำว่า "เดี๋ยว" เป็นต้น เนื่องจากเมื่อแปลเป็นภาษาต่างประเทศแล้วจะให้ความหมายผิดไปจากที่ควรจะเป็น
ห้ามถามโดยระบุชื่อผู้ตอบและต้องตั้งชื่อกระทู้ให้สื่อถึงปัญหาที่จะถาม ไม่ตั้งชื่อว่า ช่วยด้วยครับ, มีปัญหามาปรึกษาครับ เป็นต้น
กรุณาอธิบายปัญหาและระบุคำตอบที่ต้องการมาในกระทู้ด้วยเสมอถึงแม้จะอธิบายไว้ในไฟล์แนบแล้วก็ตาม ทั้งนี้เพื่ออำนวยความสะดวกแก่เพื่อนสมาชิกในการค้นหาข้อมูล
กรุณาแนบไฟล์ตัวอย่างพร้อมแสดงคำตอบที่ถูกต้องมาในไฟล์ด้วยเพื่อให้ง่ายต่อการทำความเข้าใจและสะดวกต่อการตอบคำถาม (ขนาดไฟล์ไม่เกิน 500Kb ขนาดภาพไม่เกิน 800*600 Pixel) ไม่แนบเป็น Link มาจากแหล่งอื่นที่อาจจะถูกลบทิ้งไปโดยต้นทางในภายหลัง นอกจากนี้ไม่ควรแนบไฟล์ที่มีข้อมูลสำคัญอันก่อให้เกิดความเสียหายกับตนเองและผู้อื่น
กรณีเป็นคำถามเกี่ยวกับ Programming เช่น VBA, VB.Net, C#, SQL ฯลฯ ต้องลองเขียนมาเองก่อนเสมอ ถามเฉพาะที่ติดปัญหา ระบุ Module, Procedure ที่ติดปัญหาให้ชัดเจน กรุณาโพสต์ Code ให้แสดงเป็น Code คือเปิดด้วย [code] และปิดด้วย [/code] ตัวอย่างเช่น [code]dim r as range[/code] เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)
กรุณาแจ้งผลการใช้งานเมื่อได้รับคำตอบว่าตรงกับความต้องการหรือไม่
sna
Silver
Posts: 699 Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365
#1
Post
by sna » Sat Oct 15, 2022 4:49 am
Need u r help for excel formula in attached file.
---------
For 1st column Ans...
Need to work with averageifs function, give criteria of date to from bottom latest current date to last 4 months with date functions.
How to work with date criteria for from latest date to last 4 months
part i dont know.
For 2nd Column Ans....
Use same 1st column formula,
Only averageifs unction need to give work to mention Amount if TT01 has 3times greater than 1st column average amount.
Thanks in Advance
You do not have the required permissions to view the files attached to this post.
snasui
Site Admin
Posts: 31176 Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 2019
Contact:
#2
Post
by snasui » Sat Oct 15, 2022 10:41 am
Please provide the example result of each line to understand your target value.
sna
Silver
Posts: 699 Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365
#3
Post
by sna » Sun Oct 16, 2022 3:43 am
Here is a new attached with expected result
You do not have the required permissions to view the files attached to this post.
norkaz
Gold
Posts: 1805 Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365
#4
Post
by norkaz » Sun Oct 16, 2022 5:21 am
...
Hi guy,
Still not quite sure about the criteria and what are the exact answers that you need.
Try the easy way by using the Pivot Table to solve that.
E3
=MONTH(A3)
X5
=AVERAGEIF(P5:V5,"<>0")
Y5
=LOOKUP(2,1/(K5:V5>X5*3),K5:V5)
G3..Hxxx
=INDEX(X$5:X$35,MATCH($F3,$J$5:$J$35,0))
I hope this may help you.
Norkaz
You do not have the required permissions to view the files attached to this post.
sna
Silver
Posts: 699 Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365
#5
Post
by sna » Wed Oct 19, 2022 3:03 pm
without pivot table,can any possible solutions with formula?
norkaz
Gold
Posts: 1805 Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365
#6
Post
by norkaz » Wed Oct 19, 2022 3:28 pm
Hi Guy,
Before taking the formula to solve that, please help to confirm the answers I provided were the correct ones that you need.
Norkaz
norkaz
Gold
Posts: 1805 Joined: Wed Jan 12, 2011 7:59 pm
Excel Ver: 2013,365
#7
Post
by norkaz » Wed Oct 19, 2022 4:39 pm
...
If the results are still the same as I provided by using the Pivot Table, try this with the formula to solve that.
G3
=SUMPRODUCT($C$3:$C$366*(F3=$B$3:$B$366)*(MONTH($A$3:$A$366)>5))/7
H3
=IFERROR(LOOKUP(2,1/(((F3=$B$3:$B$366)*$C$3:$C$366)>=G3*3),$C$3:$C$366),0)
Norkaz
You do not have the required permissions to view the files attached to this post.
sna
Silver
Posts: 699 Joined: Tue May 05, 2020 8:18 am
Excel Ver: Excel 365
#8
Post
by sna » Wed Oct 19, 2022 9:07 pm
Thanks