+ Reply to Thread
Results 1 to 8 of 8

Extract verified cost from string previous to simbol ?

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    Barcelona
    MS-Off Ver
    2013
    Posts
    6

    Extract verified cost from string previous to simbol ?

    Hi.

    I would like to come up with a formula that extracts cost (numbers) from a string, before simbol "euro", but with the difficulty that there are other numbers in the same string, and numbers can have different forms as seen in the attached example file. I use a formula but it doesn't work for every case. I think it has to be validating string extraction from simbol "euro" adding 1 character at a time and see if it's a number, do this for for previous characters until it says it's not a number any more because it may have a space, or "(" or any other simbol and not number or comma or dot to separate decimals. Hope it's clear in the example. Thanks in advance.
    Attached Files Attached Files
    Last edited by jmrc123; 08-03-2022 at 06:45 AM. Reason: Closing

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Extract verified cost from string previous to simbol ?

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    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
    43,893

    Re: Extract verified cost from string previous to simbol ?

    We might need to tweak this... depending on decimal comma/decimal point issues... but:

    =IFERROR(LOOKUP(99^99,--MID(SUBSTITUTE(A2,",","."),FIND("?",A2)-ROW($1:$20),ROW($1:$20))),"")
    Attached Files Attached Files
    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

  4. #4
    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
    43,893

    Re: Extract verified cost from string previous to simbol ?

    NB - don't use the formula from the post - the Forum turned a euro sign into a question mark! use the one in the file.

  5. #5
    Registered User
    Join Date
    03-30-2016
    Location
    Barcelona
    MS-Off Ver
    2013
    Posts
    6

    Re: Extract verified cost from string previous to simbol ?

    Hi. Thanks, Glenn, but it doesn't work, it give me numbers after a "," and not all correct value for all number that has to include commas or dots. Thanks.

  6. #6
    Registered User
    Join Date
    03-30-2016
    Location
    Barcelona
    MS-Off Ver
    2013
    Posts
    6

    Re: Extract verified cost from string previous to simbol ?

    I have reviwed the formula and for number standard parameters I changed "." for "," in the substitute and worked fine. Many thanks.

  7. #7
    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
    43,893

    Re: Extract verified cost from string previous to simbol ?

    As I said, it might need a tweak - as uyou use decimal commas. It works fine here.

    see if the attached file is better.
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    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
    43,893

    Re: Extract verified cost from string previous to simbol ?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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. Problem in Dax to create measure to find Previous date Latest Cost.
    By Ramzan-ul-Mubarak in forum Excel General
    Replies: 0
    Last Post: 03-17-2022, 03:56 AM
  2. Cost reversal (if a certain value, then all previous data in time series equal)
    By MrFisherman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2021, 07:26 PM
  3. Formula to calc cost based on previous
    By tdugas2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2018, 01:07 PM
  4. [SOLVED] Making a worbook verified for all macros
    By Szwadron6 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2017, 06:14 AM
  5. Replies: 1
    Last Post: 06-01-2014, 09:56 PM
  6. Cost of Goods in Previous Years
    By kwallace43 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-15-2010, 07:40 PM
  7. How to add Accumilative + daily cost value from the previous worksheet automatically
    By uaeXXuae in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2009, 08:55 AM

Tags for this Thread

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