+ Reply to Thread
Results 1 to 8 of 8

Looking for 2XL to mark Y

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Looking for 2XL to mark Y

    GENTS T SHIRT Black 2XL
    GENTS T SHIRT Black XL
    GENTS T SHIRT Blue Large
    GENTS T SHIRT Grey 2XL

    Assuming this being on A1 , formula required on B1 to mark Y if A1 has 2XL then on C1 I want formula to pull out colour , the colour will usually be the second last word

  2. #2
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Looking for 2XL to mark Y

    What also will be the formula to pull out last word , result on above at d1 to be

    2XL
    XL
    Large
    2XL

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Looking for 2XL to mark Y

    Hi,

    In B1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In D1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I'll have to get back to you for C1 - I haven't worked out how to extract the 2nd last word yet...

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Looking for 2XL to mark Y

    For the color
    First I made a defined name to give the number of spaces within any value in column A. With the active cell anywhere on row 1,
    I defined Spaces = =LEN(Sheet1!$A1)-LEN(SUBSTITUTE(Sheet1!$A1," ",""))

    Then for the color
    =MID(A1, FIND("^", SUBSTITUTE(A1, " ", "^", Spaces-1))+1, FIND("^", SUBSTITUTE(A1, " ", "^", Spaces))-FIND("^", SUBSTITUTE(A1, " ", "^", Spaces-1))-1)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Looking for 2XL to mark Y

    A bit cumbersome, perhaps, but returns the second last word, assuming you have Aardigspook's formula in D1.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Looking for 2XL to mark Y

    Another option

    =TRIM(RIGHT(SUBSTITUTE(REPLACE(A1,LEN(A1)-LEN(D1),LEN(D1)+1,"")," ",REPT(" ",LEN(A1))),LEN(A1)))

  7. #7
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Looking for 2XL to mark Y

    Chemist I took yours for the second last word , works

    Aardigspook I took both your answers

    Thank you all

  8. #8
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Looking for 2XL to mark Y

    You're welcome - glad we could help.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automate Series Number With Adding Mark (.) or mark "-"
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2014, 12:38 PM
  2. Replies: 2
    Last Post: 10-28-2013, 03:52 PM
  3. Hello, Mark here
    By mactx in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 01-22-2013, 08:03 AM
  4. Hi. I'm Mark,
    By sparemail72 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 11-19-2012, 05:57 AM
  5. Mark data from one sheet to another,and then mark dublicate
    By minotauro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2012, 07:58 AM
  6. Quatation mark or single mark in sql query
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2010, 06:03 PM
  7. Mark every nth row
    By maxthebear in forum Excel General
    Replies: 3
    Last Post: 02-23-2009, 08:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1