+ Reply to Thread
Results 1 to 15 of 15

Convert different words to a specified value

Hybrid View

  1. #1
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Convert different words to a specified value

    Hi,

    I have a problem with converting a column of different page sizes("Full page", "Half page", "Quarter page" and so on) to the value of a full page(1, 0.5, 0.25 and so on).

    I tried to wrap my head around Vlookup but haven't prevailed..

    Attached find the example file. I will later put the data in a pivot table.

    Thank you for your time and help!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,747

    Re: Convert different words to a specified value

    Hi mjattkatt,

    Welcome to the forum.

    Try this in J2. I assumed "Spread" as 2.
    Formula: copy to clipboard
    =LOOKUP(I2,{"Full page","Half page","Quarter page","Spread"},{1,0.5,0.25,2})
    Dave

  3. #3
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Re: Convert different words to a specified value

    Quote Originally Posted by FlameRetired View Post
    Hi mjattkatt,

    Welcome to the forum.

    Try this in J2. I assumed "Spread" as 2.
    Formula: copy to clipboard
    =LOOKUP(I2,{"Full page","Half page","Quarter page","Spread"},{1,0.5,0.25,2})
    Thank you for your time and quick help!

    Tried the formula in the example file but just got an error in return.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Convert different words to a specified value

    or
    Formula: copy to clipboard
    =CHOOSE(MATCH(I2,{"Spread","Full page","Half page","Quarter page","Eighth"},0),2,1,0.5,0.25,0.125)

  5. #5
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Re: Convert different words to a specified value

    Quote Originally Posted by sandy666 View Post
    or
    Formula: copy to clipboard
    =CHOOSE(MATCH(I2,{"Spread","Full page","Half page","Quarter page","Eighth"},0),2,1,0.5,0.25,0.125)
    Thank you Sandy666, no luck here either..

    I feel like a complete idiot haha.. :D

    Would you mind trying to enter it in the example file and uploading again?

    Thank you so much for your help!

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Convert different words to a specified value

    Here is your example:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Re: Convert different words to a specified value

    Quote Originally Posted by sandy666 View Post
    Here is your example:
    Wow, thank you Sandy666!

    One last question, is it possible to wildcard the different page sizes.. Some posts have "Full spread" and "Whole spread", tried with * but it gave me no result in return.

    Eternally greatful!

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Convert different words to a specified value

    Could you attach more descriptive example? with more possibilities what you want

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,908

    Re: Convert different words to a specified value

    Try

    =CHOOSE(MATCH(I2,{"Spread","Whole Spread","Full page","Half page","Quarter page","Eighth"},0),2,1,1,0.5,0.25,0.125)

    As per Sandy's reply: need list of all possible descriptions.

  10. #10
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Re: Convert different words to a specified value

    Hi again,

    you can not believe how greatful i am for your time!!

    Attached you find the new example file where the different page sizes have different names. The names can change each day as the user specify the name be themself, but "Full page", "Spread" and so on will always be in the name.
    Attached Files Attached Files

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Convert different words to a specified value

    On the Lookups sheet create the table like this:

    Data Range
    A
    B
    1
    Type
    Value
    2
    Eighth
    0.125
    3
    Full
    1
    4
    Half
    0.5
    5
    Quarter
    0.25
    6
    Spread
    2


    Then, on the Data sheet enter this formula in J2 and copy down:

    =LOOKUP(100,SEARCH(Lookups!A$2:A$6,I2),Lookups!B$2:B$6)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Convert different words to a specified value

    you can try also (with all definitions inside):
    Formula: copy to clipboard
    =CHOOSE(MATCH(IF(IFERROR(SEARCH("Spread",I2)>0,0),"Spread",IF(IFERROR(SEARCH("Full",I2)>0,0),"Full",IF(IFERROR(SEARCH("Half",I2)>0,0),"Half",IF(IFERROR(SEARCH("Quarter",I2)>0,0),"Quarter",IF(IFERROR(SEARCH("Eighth",I2)>0,0),"Eighth",""))))),{"Spread","Full","Half","Quarter","Eighth"},0),2,1,0.5,0.25,0.125)
    but Tony's solution is much clever and shorter
    Attached Files Attached Files
    Last edited by sandy666; 06-15-2016 at 06:25 AM. Reason: example added

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Convert different words to a specified value

    Is this all definitions of basic names?
    Spread
    Full page
    Half page
    Quarter page
    Eighth

    and no more?

    edit:
    I suggest to use:
    Spread
    Full
    Half
    Quarter
    Eighth

    because word "page" has no matter
    Last edited by sandy666; 06-15-2016 at 05:37 AM.

  14. #14
    Registered User
    Join Date
    06-15-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    6

    Re: Convert different words to a specified value

    No more those are the basic names, i will later on translate them to the correct language, used english in the example file for clarity

  15. #15
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: Convert different words to a specified value

    Or try this ...

    =VLOOKUP("*"&I2&"*",Lookups!$A$2:$B$6,2,0)

+ 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. Convert numbers to words
    By kipminorball in forum Excel General
    Replies: 5
    Last Post: 02-13-2016, 10:35 PM
  2. [SOLVED] Convert Number to Words
    By SMILE in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2013, 01:24 AM
  3. [SOLVED] How do I convert Rs.100/- in words?
    By Prady in forum Excel General
    Replies: 1
    Last Post: 08-10-2006, 01:45 PM
  4. [SOLVED] convert numbers to words
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. convert numbers to words
    By prags in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  6. convert numbers to words
    By prags in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. [SOLVED] convert numbers to words
    By prags in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-04-2005, 05:05 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