+ Reply to Thread
Results 1 to 7 of 7

How to calculate multiple strings in same cell

  1. #1
    Registered User
    Join Date
    01-04-2014
    Location
    Hemet, CA
    MS-Off Ver
    Excel 2008 for Mac vs12.3.6
    Posts
    4

    Angry How to calculate multiple strings in same cell

    String Multiples for 3 different criteria in same cell -- "if", "or" "abs" --- not sure if any of these are correct
    1) Criteria 1 and 2: In cell "E" I am wanting to minus "B from C", if "A" is greater than or equal to and less than "=>1000 or <15000"
    2) and the other criteria would be if "A" is greater than or equal to ">=15000" then minus "b from d" -- answer would also be in the same cell "e".

    I hope I am saying my needs correctly. Basically, I have 3 different sales criteria with 3 different bonus offers. One offer is for sales less than 10,000, another offer is for the range 10,000 to 14,999 and the last is for the range 15,000 or more. I am actually linking the values from different worksheets, however I have used generically "A, B, C, D and E".

    below are the 3 separate formulas that do work on specific individual rows. However, I really need the criteria for all three variables in the same cell. Right now I am just copy/paste the appropriate formula that fits the specific value in each row. Not good, I know. :-(
    =IF(summary!$E8>15000,SUM(F3-summary!D2),0)

    =IF($E4<15000,ABS(F4-summary!D3),IF($E4>=10000,0,(F4-summary!D3)))

    =IF($E14<15000,ABS(F14-summary!D13),IF($E14>=10000,0,(F14-summary!D14)))

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to calculate multiple strings in same cell

    Hi,

    Not quite sure if I've understood your requirement, if not upload an example workbook with some sample data and manually calculated results indicating which are the results.

    In general though

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


    just substitute the calculations that you want to apply for the three literal results.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to calculate multiple strings in same cell

    what is your criteria to copy/paste a formula ?

  4. #4
    Registered User
    Join Date
    01-04-2014
    Location
    Hemet, CA
    MS-Off Ver
    Excel 2008 for Mac vs12.3.6
    Posts
    4

    Re: How to calculate multiple strings in same cell

    Basically, I am trying to calculate a CR (reduction) off Base Rent that is based on the Sales Price (Net Rent).
    Argument 1: If the Sales Price is 15000 or greater, then the SBCR is 199. Therefore, with a Base Rent of 499 the CR is 300.
    Argument 2: If the Sales Price is from 10000 to 14999 then the SBCR is 299. Therefore, with Base Rent of 499 the CR is 200.
    Argument 3: If the Sales Price is less than 10000 (0 to 9,999) the SBCR is 0 (Zero). Therefore, if the Base Rent is 499 the CR is 0 or blank.

    The sample below are cells pulled from my summary worksheet:
    SBCR-1 199
    SBCR-2 299

    The sample below are cells from my Data worksheet:
    Sales Price Base Rent Credit
    15,900 499 300 =IF(summary!$E8>15000,SUM(F3-summary!D2),0)
    13,900 499 200 =IF($E4<15000,ABS(F4-summary!D3),IF($E4>=10000,0,(F4-summary!D3)))
    9,900 499 0 =IF($E14<15000,0,IF($E14>=10000,0))

    When I said that I copy/pasted I meant that when I visually saw the Sales Price, I would paste a correct formula for that Row. I would like to have the 3 arguments for every row that covers the 3 different Sales Price Ranges. I have such a huge margin of error using only my visual of each row.

    Richard, I will try your formula and let you know if that works. I appreciate the time and suggestion to my problem.

  5. #5
    Registered User
    Join Date
    01-04-2014
    Location
    Hemet, CA
    MS-Off Ver
    Excel 2008 for Mac vs12.3.6
    Posts
    4

    Re: How to calculate multiple strings in same cell

    Thank you so much!!!! The link you suggested to me gave me many scenarios. I was able to find a suggestion to help me move forward. Just in case you would like to know, here is the formula I ended up using AND IT IS PERFECT!!!!

    =IF(E15>15000,F15-summary!$D$2,IF(AND(E15>=10000,E15<=14999),F15-summary!$D$3,IF(AND(E15<=9999),0)))


  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to calculate multiple strings in same cell

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  7. #7
    Registered User
    Join Date
    01-04-2014
    Location
    Hemet, CA
    MS-Off Ver
    Excel 2008 for Mac vs12.3.6
    Posts
    4

    Re: How to calculate multiple strings in same cell

    Thank you, Administrator. I was so excited that the formula worked that I didn't look to see that "Solved" was my next step. However, I think that I did press "Star" for reputation. I will try that one again.

    This was my first post. Everyone was awesome. Perhaps I can return the favor someday.

+ 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. [SOLVED] Format individual strings out of multiple strings within a cell with VBA
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-18-2013, 07:33 PM
  2. excel formula to search Multiple strings in several columns and return strings
    By krratna123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 11:20 AM
  3. Replies: 1
    Last Post: 08-13-2013, 08:32 AM
  4. Look for multiple strings in a cell
    By reddy14 in forum Excel General
    Replies: 7
    Last Post: 03-06-2012, 05:30 PM
  5. Replies: 3
    Last Post: 05-28-2011, 01:43 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