Page 1 of 1
รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 1:25 pm
by natthaporn
รบกวนสอบถามท่านผู้รู้เกี่ยวกับสูตรการเปลี่ยนตัวอักษรตัวแรกให้เป็นตัวพิมพ์ใหญ่ ส่วนตัวถัดไปให้เป็นตัวพิมพ์เล็ก ยกเว้นตัวที่อยู่หลัง "-" ให้เป็นตัวพิมพ์ใหญ่ทั้งหมด ซึ่งดิฉันใช้สูตร =proper ได้ผลลัพธ์ ดังนี้คะ
Acc.payable under forward cont-Bought
Acc.payable under forward cont-Sold
Acc.payable under hedging cont.- Ap
Acc.payable under hedging cont.- Ar
ซึ่งดิฉันต้องการผลลัพธ์ดังนี้คะ
Acc.Payable Under Forward Cont-BOUGHT
Acc.Payable Under Forward Cont-SOLD
Acc.Payable Under Hedging Cont.- AP
Acc.Payable Under Hedging Cont.- AR
ขอบคุณคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 1:53 pm
by tupthai

สมมติ ข้อมูลอยู่ A1
ที่เซลล์ไดๆ พิมพ์สูตร =LEFT(PROPER(A1),FIND("-",A1))&UPPER(MID(A1,FIND("-",A1)+1,LEN(A1)-FIND("-",A1)))
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 4:29 pm
by natthaporn
ได้ผลลัพธ์ตามที่ต้องการแล้วคะ ขอขอบคุณ คุณ tupthai มากคะ ดิฉันอยากจะรบกวนถามเพิ่มอีกนิดหนึ่งคะ ถ้าการเปลี่ยนตัวอักษรตัวแรกให้เป็นตัวพิมพ์ใหญ่ ส่วนตัวถัดไปให้เป็นตัวพิมพ์เล็ก ส่วนตัวที่อยู่หลัง "-" ให้คงไว้เช่นเดิมจะต้องปรับสูตรอย่างไรคะ
Acc.payable under forward cont-Bought
Acc.payable under forward cont-Sold
Acc.payable under hedging cont.- AP
Acc.payable under hedging cont.- AL
ซึ่งดิฉันต้องการผลลัพธ์ดังนี้คะ
Acc.Payable Under Forward Cont-Bought
Acc.Payable Under Forward Cont-Sold
Acc.Payable Under Hedging Cont.- AP
Acc.Payable Under Hedging Cont.- AL
ขอบคุณคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 4:34 pm
by tupthai
=PROPER(A1)
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 5:09 pm
by natthaporn
ถ้าเกิดใช้ =proper สูตรจะได้ผลลัพธ์ ดังนี้คะ
Acc.Payable Under Forward Cont-Bought
Acc.Payable Under Forward Cont-Sold
Acc.Payable Under Hedging Cont.- Ap (จะไดเ "p" ที่เป็นตัวพิมพ์เล็ก)
Acc.Payable Under Hedging Cont.- Al (จะไดเ "l" ที่เป็นตัวพิมพ์เล็ก)
ซึ่งดิฉันต้องการผลลัพธ์ดังนี้คะ
Acc.Payable Under Forward Cont-Bought
Acc.Payable Under Forward Cont-Sold
Acc.Payable Under Hedging Cont.- AP
Acc.Payable Under Hedging Cont.- AL
กล่าวคือ ไม่ให้ค่าหลัง "-" เปลี่ยนแปลงคะ
ขอบคุณคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 5:21 pm
by tupthai

เปลี่ยนเป็นแบบนี้ครับ
สมมติ ข้อมูลอยู่ A1
ที่เซลล์ไดๆ พิมพ์สูตร
=LEFT(PROPER(A1),FIND("-",A1))&MID(A1,FIND("-",A1)+1,LEN(A1)-FIND("-",A1))
หรือ
=LEFT(PROPER(A1),FIND("-",A1))&RIGHT(A1,LEN(A1)-FIND("-",A1))
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 5:34 pm
by natthaporn
ได้ผลลัพธ์ตามที่ต้องการแล้วคะ ขอขอบคุณคุณ tupthai มากคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 5:48 pm
by natthaporn
ต้องขอรบกวนอีกครั้งหนึ่งคะ พอนำสูตรนี้ไปใช้กับข้อมูลอื่น เช่น
Provision for accured income
ปรากฎว่าเกิด #Value! ขึ้นคะ ซึ่งดิฉันต้องการผลลัพธ์ดังนี้คะ
Provision For Accured Income
ดิฉันอยากจะขอรบกวนแนะนำสูตรที่ใช้ได้ทั้งสองเงื่อนไขคะ
Acc.payable under forward cont-Bought
Acc.payable under forward cont-Sold
Acc.payable under hedging cont.- AP
Acc.payable under hedging cont.- AR
Provision for accured income
ผลลัพธ์
Acc.Payable Under Forward Cont-Bought
Acc.Payable Under Forward Cont-Sold
Acc.Payable Under Hedging Cont.- AP
Acc.Payable Under Hedging Cont.- AR
Provision For Accured Income
ดิฉันต้องขอโทษด้วยนะคะ ที่ไม่ได้ถามให้ครอบคลุมต้องแต่แรก
ขอบคุณคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 8:00 pm
by tupthai
เปลี่ยนเป็นแบบนี้ครับ
=IF(ISNUMBER(FIND("-",A1)),LEFT(PROPER(A1),FIND("-",A1))&RIGHT(A1,LEN(A1)-FIND("-",A1)),A1)
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 9:17 pm
by natthaporn
ได้ผลลัพธ์ตามที่ต้องการแล้วคะ ต้องขอขอบคุณคุณ tupthai อีกครั้งคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Wed Mar 13, 2013 10:19 pm
by วังวู ช่ง
สุดยอดจิงๆครับ คนไทยทุกท่านมีน้ำใจดีจิงๆครับ
นับถือด้วยครับ ดีจิงๆๆๆๆ ก้าวหน้าจิงๆ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Fri Mar 22, 2013 9:08 am
by natthaporn
รบกวนสอบถามท่านผู้รู้เพิ่มเติมอีกครั้งหนี่งคะ พอดิฉันใช้สูตรที่แนะนำมาปรากฎว่ามีข้อมูลเพิ่มเข้ามาภายหลังดังนี้คะ
Acc.payable under forward cont-Bought sale plan
Acc.payable under hedging cont.- AR of transport
Account Receivable-Sales of fixed assets-RPT
Provision for accured income
ผลลัพธ์
Acc.Payable Under Forward Cont-Bought Sale Plan
Acc.Payable Under Hedging Cont.- AR Of Transport
Account Receivable-Sales Of Fixed Fssets-RPT
Provision For Accured Income
ดิฉันมีเงื่อนไขเพิ่มเติมดังนี้ ต้องการเปลี่ยนตัวอักษรตัวแรกให้เป็นตัวพิมพ์ใหญ่ ส่วนตัวถัดไปให้เป็นตัวพิมพ์เล็ก ส่วนตัวที่อยู่หลัง "-" ให้คงไว้เช่นเดิม แต่พอหลัง "-" เจอช่องว่าง ให้เปลี่ยนตัวอักษรตัวแรกให้เป็นตัวพิมพ์ใหญ่ ส่วนตัวถัดไปให้เป็นตัวพิมพ์เล็กเช่นเดิมคะ
ดิฉันเข้าใจว่าเงื่อนไขเยอะมากคะ ถ้าไม่ได้ก็ไม่เป็นไรนะคะ
ขอบคุณคะ
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Fri Mar 22, 2013 9:21 am
by snasui
Re: รบกวนสอบถามสูตรการเปลี่ยนตัวอักษร
Posted: Fri Mar 22, 2013 9:42 am
by natthaporn
ขอบคุณคะอาจารย์ ดิฉันคงต้องเลือกใช้วิธิ 1,2,3 ถ้าเป็น VBA ดิฉันยังเพิ่งแค่เริ่มหัดเขียนคะ ดิฉันกำลังจะหาที่เรียนการเขียน VBA อยู่คะ