: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

การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

ฟอรัมถาม-ตอบปัญหาการใช้งาน MS Excel and VBA
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. กรุณาแจ้งผลการใช้งานเมื่อได้รับคำตอบว่าตรงกับความต้องการหรือไม่
ต้า
Member
Member
Posts: 102
Joined: Fri Sep 26, 2014 8:40 am

การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#1

Post by ต้า »

สวัสดีครับ อาจารย์ และทุกคน

ผมรบกวนช่วยเขียนสูตร ในการเลือกเอาเฉพาะ ข้อมูลที่ต้องการจากlink ด้วยครับ
Column A คือ link ที่ต้องการให้จัดเรียงใหม่ โดยมีรูปแบบคือ
เช่น http://www.walmart.com/ip/ ตามด้วย เลขรหัสสินค้า 26845755
http://www.walmart.com/ip/ + 26845755
จะได้เป็นlink ใหม่คือ http://www.walmart.com/ip/26845755

และ column F คือรูปแบบ link ที่ผมได้มาจากเวปไซด์ ซึ่งจะมีปนกันอยู่หลาย แบบ

ป.ล. จากที่ผมสังเกตุ ตัวเลขรหัสสินค้า มันจะอยู่ หลัง เครื่องหมาย "/"
หรืออยู่ระหว่า "/" ..... "?" คับ

ผมได้แนบไฟล์มาด้วยครับ

ขอบคูณครับ
You do not have the required permissions to view the files attached to this post.
User avatar
puriwutpokin
Guru
Guru
Posts: 3712
Joined: Fri Jan 04, 2013 9:49 pm
Location: Bangkok
Excel Ver: MS.365

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#2

Post by puriwutpokin »

ลองดูตามนี้ครับ=IF(LEN(LEFT(F2,FIND("ip/",F2)+2)&TRIM(RIGHT(SUBSTITUTE(F2,"/",REPT(" ",50)),50)))=34,LEFT(F2,FIND("ip/",F2)+2)&TRIM(RIGHT(SUBSTITUTE(F2,"/",REPT(" ",50)),50)),LEFT(F2,FIND("ip/",F2)+2)&MID(F2,FIND("?",F2)-8,8))
:shock: :roll: :D
ต้า
Member
Member
Posts: 102
Joined: Fri Sep 26, 2014 8:40 am

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#4

Post by ต้า »

สวัสดีครับ อาจารย์ และ คุณ puriwutpokin

จากสูตรที่ได้มาผมลองเอาใช้แล้วติดปัญหานิดหน่อยครับ ตรงที่ ว่า
เลขของรหัสสินค้า ทีมี 7 และ 9 หลัก จะขึ้นเป็น #VALUE! ครับ
ส่วน 8 หลักนั้นไม่มีปัญหาครับ
เรามีวิธีแก้สูตรเดียวให้สามารถใช้ ทั้ง 7,8 และ 9 ได้หรือเปล่าครับ

ขอบคุณครับ
ต้า
Member
Member
Posts: 102
Joined: Fri Sep 26, 2014 8:40 am

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#5

Post by ต้า »

เพิ่มเติมครับ

อันนี้เป็นของ link ที่มีปัญหาครับ
http://www.walmart.com/ip/Dora-the-Explorer-Disposable-Toilet-Seat-Covers-40-Count/4809923
http://www.walmart.com/ip/1762411
http://www.walmart.com/ip/Oster-6-Cup-Plastic-Accessory-Jar-4917/5811515
http://www.walmart.com/ip/JL-Childress-Tall-TwoCOOL-Bottle-Bag/5652246
http://www.walmart.com/ip/Oneida-20-Piece-Tuscany-Flatware-Service-for-4/8065497
http://www.walmart.com/ip/London-3-Tier-Oval-End-Table-Black/4291323
http://www.walmart.com/ip/Farberware-14-Piece-Professional-Tool-and-Gadget-Set/9219276
https://www.walmart.com/ip/Mooshka-Goodnight-Starlight-Doll-Jessa/37408188
https://www.walmart.com/ip/Infantino-Sash-Mei-Tai-Baby-Carrier/19852753
https://www.walmart.com/ip/Home-Styles-Bermuda-Kitchen-Cart-Espresso/32905374
https://www.walmart.com/ip/Kinetic-Sand-14-oz-Punchy-Purple/46549656
https://www.walmart.com/ip/Paw-Patrol-Deluxe-Lights-and-Sounds-Plush-Real-Talking-Rubble/37311372

https://www.walmart.com/ip/Fisher-Price-Thomas-Shark-Exhibit-Play-Set/22903938
https://www.walmart.com/ip/Mooshka-Tots-Doll-Fara/42206346
http://www.walmart.com/ip/Mommy-s-Helper-Drain-N-Dry-Bottle-Rack/9203736
https://www.walmart.com/ip/Sky-Viper-s670-Stunt-Drone/46428366
https://www.walmart.com/ip/Cosco-Willow-Lake-6-Drawer-Dresser-WhiteGray/47961358
https://www.walmart.com/ip/KidKraft-Tiffany-Ironing-Board/15730015
https://www.walmart.com/ip/Disney-Sofia-the-First-Collapsible-Storage-Trunk/36283422
https://www.walmart.com/ip/Maxi-Matic-Elite-Gourmet-6-qt.-Electric-Manual-Ice-Cream-Maker-Wood/36011567
https://www.walmart.com/ip/Little-Tikes-30th-Anniversary-Cozy-Coupe/10760039
https://www.walmart.com/ip/Nerf-N-Strike-Elite-Strongarm-Blaster/22866794
https://www.walmart.com/ip/Paw-Patrol-Paw-Patroller/45300865
https://www.walmart.com/ip/Sorry-2013-Edition-Game/24806142
https://www.walmart.com/ip/Cardinal-Gates-Stairway-Special-Child-Safety-Gate/30253184
https://www.walmart.com/ip/Transformers-Generations-Combiner-Wars-Victorion-Collection-Pack/51251997
http://www.walmart.com/ip/Neu-Home-Shelf-with-Towel-Rack/5508748
https://www.walmart.com/ip/Fisher-Price-Power-Wheels-Dune-Racer-12-Volt-Battery-Powered-Ride-on-Green/15779611
https://www.walmart.com/ip/Comfort-Products-Coublo-Filing-Cabinet-Dark-Mocha-Brown/29461846
http://www.walmart.com/ip/6560497
https://www.walmart.com/ip/Play-Doh-Starter-Set/44727455
https://www.walmart.com/ip/Step2-Easel-for-Two-Pink-with-77-Piece-Kit/11072579
https://www.walmart.com/ip/Badger-Basket-Doll-Bunk-Bed-with-Ladder-and-Armoire/15907762
https://www.walmart.com/ip/Melissa-Doug-Wooden-Brew-Serve-Coffee-Set/50388302
https://www.walmart.com/ip/Slinky-Science-Slime-Science/17048720
http://www.walmart.com/ip/Gilmour-50-foot-Soaker-Hose/1551074
https://www.walmart.com/ip/LeapFrog-LeapStart-Preschool-Activity-Book-Daily-Routines-and-Health-Wellness/51676234
https://www.walmart.com/ip/LeapFrog-LeapStart-Preschool-Activity-Book-Daily-Routines-and-Health-Wellness/51676234
https://www.walmart.com/ip/Learning-Resources-MagnaBorders-Pencils/22423942
https://www.walmart.com/ip/Moose-Toys-Little-Live-Pets-S4-Tweet-Talking-Duck-and-Baby-Waddle-Family/47770014
http://www.walmart.com/ip/Dream-Baby-Adjustable-Car-Sun-Shade-2-Pack/9856672
https://www.walmart.com/ip/Ravensburger-Fairy-Playland-Puzzle-100-Pieces/17772464
https://www.walmart.com/ip/Lion-Guard-Talking-Light-Plush-Bunga/47389737
https://www.walmart.com/ip/Kidz-Delight-K15500M-Tech-Too-My-First-2-N-1-Tablet/47754525
https://www.walmart.com/ip/Kidz-Delight-K15500M-Tech-Too-My-First-2-N-1-Tablet/47754525
https://www.walmart.com/ip/LeapFrog-LeapStart-1st-Grade-Activity-Book-Space-Science-and-Thinking-Like-a-Scientist/51676245
https://www.walmart.com/ip/WowWee-8015-Robosapien-Blue/46208400
https://www.walmart.com/ip/LEARNING-RESOURCES-LER0409-GIANT-SOFT-CUBE-SET-6-PK-1-EA.-2096-0411-0412/24886247
https://www.walmart.com/ip/Teenage-Mutant-Ninja-Turtles-Donnie-Skate-Launch/48810301
https://www.walmart.com/ip/Pom-Pom-Wow-Ultimate-Variety-Pack/52025174
https://www.walmart.com/ip/Tiny-Love-Sweet-Island-Dreams-Mobile/10205616
https://www.walmart.com/ip/LeapFrog-LeapTV-Disney-Jake-and-the-Never-Land-Pirates-Educational-Active-Video-Game/39173363
https://www.walmart.com/ip/Barbie-Beach-Summer-Doll/51317359
https://www.walmart.com/ip/Graco-Soft-Potty-Seat-Green/21089495
https://www.walmart.com/ip/FISHER-PRICE-Bob-The-Builder-Muck-Sand-Vehicle/49851391
http://www.walmart.com/ip/Gorilla-Playsets-Blue-Telescope/4659684
https://www.walmart.com/ip/Baby-Alive-Better-Now-Bailey-Dark-Skin/51339715
https://www.walmart.com/ip/Sweet-Novelty-60313-Jolly-Rancher-Blue-Raspberry-Large-Plush-Pillow/47909935
https://www.walmart.com/ip/Melissa-and-Doug-Toy-Shopping-Cart/17387242
https://www.walmart.com/ip/Levels-of-Discovery-Fairy-Wishes-Bench-Seat-with-Storage/17378739
https://www.walmart.com/ip/Radio-Flyer-Tricycle-With-Push-Handle/12575683
https://www.walmart.com/ip/Learning-Resources-Where-Is-Howie-s-Owie-Magnetic-Board/23434499
https://www.walmart.com/ip/Rachael-Ray-4-Quart-Melamine-Garbage-Bowl/23268039
http://www.walmart.com/ip/Whitmor-Small-Woven-Storage-Tote-With-Straps-Espresso/6023215
https://www.walmart.com/ip/3-Pc-Lil-Doll-Table-Set/21104983
https://www.walmart.com/ip/Learning-Resources-Word-and-Number-Swatters/19230181
https://www.walmart.com/ip/Learning-Resources-Standard-Pocket-Chart/15915863
https://www.walmart.com/ip/O2Cool-FD10002A-Portable-Fan-10-Diameter/24017579
https://www.walmart.com/ip/your-zone-premium-twin-over-full-bunk-bed-Multiple-Colors/34209653
https://www.walmart.com/ip/Bella-Diamonds-Programmable-Coffeemaker-Black/46081003
http://www.walmart.com/ip/London-3-Tier-Oval-End-Table-Black/4291323
http://www.walmart.com/ip/Summer-Infant-Decorative-Tall-Gate/7941650
https://www.walmart.com/ip/Rachael-Ray-Cucina-Hard-Enamel-Nonstick-12-Piece-Cookware-Set/39372537
http://www.walmart.com/ip/Wilson-NFL-Super-Grip-Football/9906640
https://www.walmart.com/ip/Cetaphil-For-Dry-Sensitive-Skin-Moisturizing-Cream-16-oz/10317216
https://www.walmart.com/ip/Gibson-Home-Soho-Lounge-Square-16-Piece-Dinnerware-Set/10980399
https://www.walmart.com/ip/The-Pioneer-Woman-Floral-Garden-4-Quart-Dutch-Oven-Multi-Color/50011666
https://www.walmart.com/ip/Mainstays-3-Shelf-Bookcase-Mocha/44786552
https://www.walmart.com/ip/Johnson-s-No-More-Tears-Head-to-Toe-Baby-Wash-9-fl-oz/10294048
https://www.walmart.com/ip/Fabuloso-Lavender-Multi-Purpose-Cleaner-128-fl-oz/32176878
https://www.walmart.com/ip/Mr.-Clean-Multi-Surfaces-Spray-Cleaner-With-Gain-Original-Fresh-Scent-40-fl-oz/17201604
https://www.walmart.com/ip/Magic-Sliders-Lp-08025-1-inch-Round-Self-Adhesive-Magic-Sliders-8-Count/38452906
https://www.walmart.com/ip/24-Mongoose-Ledge-2.1-Boys-Mountain-Bike-Silver-Red/42248088
https://www.walmart.com/ip/Mr.-Coffee-Ice-Tea-Maker-Replacement-Pitcher-REPLACEMENT-PITCHER/38471415
https://www.walmart.com/ip/24-Huffy-Girls-Trail-Runner-Mountain-Bike/41424923
https://www.walmart.com/ip/Lasko-20-Wind-Machine-Air-Circulator-Gray/22614934
https://www.walmart.com/ip/Muscle-Milk-Pro-Series-32-Knockout-Chocolate-Mega-Protein-Shake-11-fl-oz-4-count/41868039
https://www.walmart.com/ip/Equate-Original-Flavor-Milk-Of-Magnesia-26-Oz/15754359
https://www.walmart.com/ip/Arnold-Corp.-490-100-0111-Power-Rake-UNIVERSAL-POWER-RAKE/38754331
http://www.walmart.com/ip/Plano-4-Shelf-Storage-Unit-Light-Taupe/8251818
https://www.walmart.com/ip/La-Crosse-Technology-20-Extra-Large-Atomic-Analog-Clock/21191120
https://www.walmart.com/ip/Raid-Wasp-Hornet-Killer-17.5-oz/11027619
https://www.walmart.com/ip/Weber-Small-Drip-Pans/10909644
https://www.walmart.com/ip/The-Pioneer-Woman-Cowboy-Rustic-Forged-14-Piece-Cutlery-Set-Red-Rosewood-Handles/46039767
https://www.walmart.com/ip/Fairfield-Bay-3-Piece-Balcony-Bistro-Set/47428783
http://www.walmart.com/ip/Martin-s-Surrender-Fire-Ant-Control/113780290
https://www.walmart.com/ip/Mainstays-22.375x34-Trendsetter-Poster-Frame-Black/44462011
https://www.walmart.com/ip/Purell-Advanced-Refreshing-Gel-Hand-Sanitizer-8-fl-oz/24447243
https://www.walmart.com/ip/Joint-Juice-Glucosamine-Chondroitin-Blend-Blueberry-Acai-6pk-8oz/14292593
https://www.walmart.com/ip/Flexible-Flyer-Backyard-Swingin-Fun-Metal-Swing-Set/20919447
https://www.walmart.com/ip/Rubbermaid-Easy-Find-Lids-24-Piece-Plus-4-Food-Storage-Set/16550121
https://www.walmart.com/ip/12-Paw-Patrol-Bike-Featuring-Chase/54055362
https://www.walmart.com/ip/Great-Value-Heavy-Duty-9-Paper-Plates-140-count/21126485
https://www.walmart.com/ip/Mainstays-Chevron-Wastebasket-Yellow/35123579
https://www.walmart.com/ip/Lasko-Products-18-Elegance-and-Performance-Pedestal-Fan-Black/16503191
https://www.walmart.com/ip/Rubbermaid-24-Piece-Easy-Find-Lid-Container-Set-with-6-Bonus-Pieces/36006745
https://www.walmart.com/ip/Suncast-Elements-Resin-Patio-Storage-Coffee-Table-Java/43351306
https://www.walmart.com/ip/Adams-Manufacturing-Corporation-Quik-Fold-Chair/22641938
https://www.walmart.com/ip/MedOp-MaxiVision-Whole-Body-Formula-120-Capsules/116432373
https://www.walmart.com/ip/Kids-Purple-Beach-Chair-amp-Umbrella/17462206
https://www.walmart.com/ip/American-Baby-Company-Heavenly-Soft-Three-Piece-Minky-Dot-Mini-Crib-Set/17115556
https://www.walmart.com/ip/Playmobil-School-Bus/45064517
https://www.walmart.com/ip/Snow-Joe-Universal-Electric-Snow-Thrower-Chute-Clean-Out-Tool/27422620
https://www.walmart.com/ip/Water-Hose-Reel-Cart-300-FT-Outdoor-Garden-Heavy-Duty-Yard-Water-Planting-New/34875760
https://www.walmart.com/ip/Hamilton-Beach-Power-Deluxe-4-Quart-Stand-Mixer/16318427
https://www.walmart.com/ip/Whalen-3-in-1-Flat-Panel-TV-Stand-for-TVs-up-to-50/15042663
https://www.walmart.com/ip/Channellock-171-Piece-Mechanic-s-Tool-Set-39053/26011213
https://www.walmart.com/ip/Range-Kleen-B26SR-Petite-Roasting-Pan-Non-stick-8x10-inch-outer/28669333
https://www.walmart.com/ip/Nifty-Home-Products-Three-Tier-Oven-Companion-in-Chrome/19290293#about
https://www.walmart.com/ip/Pure-Protein-Vanilla-Cream-100-Whey-Protein-Powder-Nutritional-Supplement-28-oz/43333516
https://www.walmart.com/ip/Mr.-and-Mrs.-Pond-10pc-Nursery-in-a-Bag-Bedding-Set/19861483

ขอบคุณครับ
User avatar
DhitiBank
Gold
Gold
Posts: 1676
Joined: Mon Oct 15, 2012 12:07 am

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#6

Post by DhitiBank »

ลองแบบนี้ครับ

สมมติว่าลิ้งค์ที่ต้องการจะตัดอยู่ที่คอลัมน์ F ตั้งแต่แถวที่ 2 ลงไป ที่เซลล์ใดๆ คีย์

=IF(F2="","","http://www.walmart.com/ip/"&LOOKUP(9.99999E+307,--MID(F2,MAX(IF(ISNUMBER(FIND("/"&ROW($A$10:$A$99),F2)),FIND("/"&ROW($A$10:$A$99),F2)))+1,{5,6,7,8,9,10})))

กด Ctrl+Shift ค้าง แล้ว Enter >> คัดลอกลงล่างครับ
User avatar
snasui
Site Admin
Site Admin
Posts: 30758
Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 365
Contact:

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#7

Post by snasui »

:D แถมอีกตัวอย่างครับ

เซลล์ A2 คีย์

=IFERROR("http://www.walmart.com/ip/"&LOOKUP(9.99999999999999E+307,--MID(F2,FIND("@",SUBSTITUTE(F2,"/","@",LEN(F2)-LEN(SUBSTITUTE(F2,"/",""))))+1,ROW(INDIRECT("1:"&LEN(F2))))),"")

Enter > Copy ลงด้านล่าง
ต้า
Member
Member
Posts: 102
Joined: Fri Sep 26, 2014 8:40 am

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#9

Post by ต้า »

ผมรบกวนขออีกสักหนึ่ง สูตรคับ

เป็นเนื้อหาเหมือนกันเลยไม่ได้ขึ้นหัวข้อใหม่นะครับ
มาlink อีกแบบนึงครับเป็นแบบนี้

ตัวอย่าง
http://www.toysrus.com/buy/soft-plush-toys/baby-aspen-mrs.-sock-t.-pus-plush-octopus-with-4-pairs-of-socks-pink-ba15004pk-11130089
http://www.toysrus.com/buy/girls-birthday/angry-birds-red-bird-pinata-kit-bb34121pin-33362806
http://www.toysrus.com/buy/kids-sofas-flip-sofas/fun-furnishings-micro-suede-sleeper-sofa-blue-11231-3597636
http://www.toysrus.com/buy/action-figures/movies-music-tv/toy-story-4-inch-basic-action-figure-buzz-lightyear-with-wings-y4713-18597036
http://www.toysrus.com/buy/stroller-bags/inglesina-stroller-bag-a099eg400-20168966
http://www.toysrus.com/buy/sights-sounds/baby-einstein-roller-pillar-activity-balls-90573-10860444
http://www.toysrus.com/buy/utensils/spoon-fork-set-chicago-bears-chb10042-69527596

และอยากจัดเรียงใหม่ โดยเอาเฉพาะชุดเลขหลังสุดหลังเครื่องหมายขีด มาทำ เป็น link ใหม่คับ
ตัวอย่าง
http://www.toysrus.com/buy/kitchen-bath-safety/safety-1st-2-pack-window-blind-cord-wind-ups-222-2792273

เอาเฉพาะตัวเลขชุดสุดท้ายหลังเครื่องหมายขีด "2792273"

มาทำเป็นlink ใหม่
http://www.toysrus.com/product/index.jsp?productId="......"&prodFindSrc=search&cp=
จะได้เป็น
http://www.toysrus.com/product/index.jsp?productId=2792273&prodFindSrc=search&cp=

ขอบคุณครับครับ
User avatar
snasui
Site Admin
Site Admin
Posts: 30758
Joined: Sun Jan 24, 2010 12:33 pm
Location: Songkhla, Thailand
Excel Ver: 2010, 365
Contact:

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#10

Post by snasui »

:D ตัวอย่างการปรับสูตรครับ

=IFERROR("http://www.toysrus.com/product/index.js ... d="&LOOKUP(9.99999999999999E+307,--MID(F2,FIND("@",SUBSTITUTE(F2,"-","@",LEN(F2)-LEN(SUBSTITUTE(F2,"-",""))))+1,ROW(INDIRECT("1:"&LEN(F2))))),"")&"&prodFindSrc=search&cp="
User avatar
DhitiBank
Gold
Gold
Posts: 1676
Joined: Mon Oct 15, 2012 12:07 am

Re: การตัดคำบางคำออกจากlink เพื่อเรียงเป็นlink ใหม่

#11

Post by DhitiBank »

:thup: ขอบคุณอาจารย์ครับ

substitute ทำแบบนี้ก็ได้นี่นา ลืมไปเลย
Post Reply