Viewing 21 posts - 1 through 21 (of 21 total)
  • EXCEL HELP – Please
  • rottwieler
    Free Member

    I have a spread sheet to process which is a couple of thoushand lines long.

    in column B it has a clothing description including size is there a formula i can use to take the size from that column and place it in Column N

    Sizes are XS,S,M,L,XL,XXL,XXXL

    Thanks

    joao3v16
    Free Member

    I assume the column is variable length?

    Is the size always the last characters of the line, or in the midst of other text?

    Stoner
    Free Member

    as joao says, do you have a common form factor for the cell content in B? Got an example?

    rondo101
    Free Member

    Need more info on the format of data in column B to help.

    Stoner
    Free Member

    i.e.

    “Colour:Red, Material:Cotton, Product:TShirt, Size:XL, Logo:Red” etc

    or

    RedCotTShXLRed

    or

    “This tastefully decorated gimp mask has diamanté highlights to the ball gag fittings that offsets the red PVC beautifully. This comes in size XL”

    soma_rich
    Free Member

    You can get one size from the string. I think…
    =MID(A2,FIND(“m”,A2),1) where you are looking for M

    pealy
    Free Member

    You can get one size from the string. I think…
    =MID(A2,FIND(“m”,A2),1) where you are looking for M”

    ..but of course looking for “L” will find it in a description having L,XL,XXL,Lemon,Latex,Lingerie

    Come on rottwieler, give us some rows to look at!

    rottwieler
    Free Member

    Equipe Short Sleeve Jersey Black S
    Equipe Short Sleeve Jersey Black M
    Equipe Short Sleeve Jersey Black L
    Equipe Short Sleeve Jersey Black XL
    Equipe Short Sleeve Jersey Black XXL

    size is not always in the same place but usually at the end

    Stoner
    Free Member

    size is not always in the same place but usually at the end

    unfortunately it’s a case of a miss is as good as a mile with spreadsheet functions 😉

    Will see if I can come up with something that can work with that..back in a tick…

    pealy
    Free Member

    If it’s ALWAYS at the end then you can use this:

    =IF(RIGHT(A1,4)=”XXXL”,”XXXL”,IF(RIGHT(A1,3)=”XXL”,
    “XXL”,IF(RIGHT(A1,2)=”XL”,”XL”,IF(RIGHT(A1,2)=”XS”,
    “XS”,IF(RIGHT(A1,1)=”S”,”S”,IF(RIGHT(A1,1)=”M”,”M”,
    IF(RIGHT(A1,1)=”L”,”L”,”Unknown”)))))))

    If it’s not always at the end then you’ll never be able to stop something like “Equipe Short Sleeve” looking like a Small

    pealy
    Free Member

    If it’s not always at the end then you’ll never be able to stop something like “Equipe Short Sleeve” looking like a Small

    Unless there are a limited number of words you can choose to ignore like:

    Equipe
    Short
    Long
    Sleeve
    Jersey
    Blank
    White

    If you can list all the words which aren’t a size, eliminate them from the text, you should be left with just the size. I’d do that using search & replace in a text editor if it’s a one-off.

    Stoner
    Free Member

    this will return the last “thing” in the cell, regardless of length or numbers of spaces.

    But if the last thing isnt the size you want, you will need to go and fiddle with it manually

    =RIGHT(B1,LEN(B1)-FIND(“|”,SUBSTITUTE(B1,” “,”|”,LEN(B1)-LEN(SUBSTITUTE(B1,” “,””)))))

    geoffj
    Full Member

    “This tastefully decorated gimp mask has diamanté highlights to the ball gag fittings that offsets the red PVC beautifully. This comes in size XL”

    I think you’ll find that those ARE available in XXL if you know which websites to search. 😳

    pealy
    Free Member

    I vote Stoner’s solution more elegant.

    snakebite
    Free Member

    Laura is good with excel….. 🙂

    charlierevell
    Free Member

    Would it not be a start to break the cell up into multiple cells? Then you can hunt out the size even if its in the wrong column. Surely with some clever if statements you could get some results?

    Searching for L would just be mental!

    pealy
    Free Member

    Does it need to be bulletproof, used regularly etc? Could you just try it with the suggestion and see how many exceptions you get? You may find there are few enough to handle manually.

    Stoner
    Free Member

    d’Oh. thats a good point pealy, use Data>Text to Columns. Delimited by Space, to break it all up, then use a series of MATCH functions to find the size…

    Zulu-Eleven
    Free Member

    Just spoke to PO on the phone, and I think we sorted it

    text to columns, with space as the delimiter

    so you end up with five words, each in a different column and the size in the sixth column

    now concatenate the first four columns reinserting spaces with text ” ”

    =CONCATENATE(A3,” “,B3,” “,C3,” “,D3,” “,E3)

    giving you two columns with words in one, and sizes in the other.

    pealy
    Free Member

    giving you two columns with words in one, and sizes* in the other.

    * as long as the size is always at the end.. Isn’t that where we came in?

    rottwieler
    Free Member

    Cheers guys i think we have cracked it thanks for all your helps

Viewing 21 posts - 1 through 21 (of 21 total)

The topic ‘EXCEL HELP – Please’ is closed to new replies.