+ Reply to Thread
Results 1 to 5 of 5

Multiple formulas within a text string?

  1. #1
    Registered User
    Join Date
    06-30-2020
    Location
    New Zealand
    MS-Off Ver
    2013
    Posts
    2

    Multiple formulas within a text string?

    Hello - We have a CSV file with a text string and we need to calculate data from another cell using formulas in several locations of the text string.

    This is the text string with the formulas marked in blue.

    {"administrator":{"role_price":"=C2*1.15"},"customer":{"role_price":""},"Price_Level_B":{"role_price":"=C2*1.6/1.7*1.15"},"Price_Level_D":{"role_price":"=C2*1.1*1.15"},"Price_Level_F":{"role_price":"=C2*1.6/1.8*1.15"},"staff_discount":{"role_price":"=C2*1.15"},"wholesale":{"role_price":"=C2*1.15"},"wholesale_cod":{"role_price":"=C2*1.15"}}

    After some research, it appears we cannot have multiple formulas in a single cell, so is there an alternative way we can achieve the above?

    Thank you in advance!

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,458

    Re: Multiple formulas within a text string?

    Is this string in 1 cell or in 6 cells?
    Which criteria to define which of 6 formulas to be used?
    Quang PT

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Multiple formulas within a text string?

    Hi, welcome to the forum

    Actually, you can have multiple formulas in 1 cell.

    The problem here, however, is that you have a purely text entry, it is not a formula, even though there are some text in there that look like a formula (or a number). Any time there is ANY text in a cell like that, excel treats it as a text entry, and you cannot (normally) runs calcvs on text...how much is Tree - fish?)

    That's not to say what you want cannot be done, but it is not quite that simple.

    I might start off with Text2Columns, using = as the break, to start breaking that string up. You could then start manipulating the resultant cells to get what you need,
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    06-30-2020
    Location
    New Zealand
    MS-Off Ver
    2013
    Posts
    2

    Re: Multiple formulas within a text string?

    Thank you for the welcome!

    I think the text2column option might be the best way to go. Do you think splitting up the text and formulas into their own cells then joining them together using the CONCATENATE command would work? This might be the easier option for me since I have used that command before. Appreciate your feedback!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Multiple formulas within a text string?

    Best way to find out is to try

    How many do you have to do?

+ 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. Underline a specific part of a text string (inc formulas) using VBA.
    By Oriya in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-06-2019, 05:56 AM
  2. Formulas for Counting and Displaying Text String Recurrences
    By thegivenbeing in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-18-2016, 08:33 AM
  3. Replies: 2
    Last Post: 05-14-2015, 01:30 PM
  4. Deliminating a text string by using formulas - HELP PLEASE!
    By datavalidator in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-05-2014, 01:20 AM
  5. [SOLVED] Formulas to find the first and last numeric value and text string in a column
    By Rambo4711 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2013, 05:20 AM
  6. Array Formulas and Text String LookUps
    By a8vry in forum Excel General
    Replies: 1
    Last Post: 04-09-2009, 12:35 PM
  7. Array Formulas and Text String LookUps
    By a8vry in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-09-2009, 12:10 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