+ Reply to Thread
Results 1 to 16 of 16

help make a formula adding ingredient unit

  1. #1
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    help make a formula adding ingredient unit

    can you help me make another formula that can add together all balance.

    1ca + 1ca + 1ca + 11b 3p 1cu = 3ca 11b 3p 1cu

    1ca = 16b
    1b = 5p
    1p = 3cu

    ca=carton, b=box, p=pump, cu=cup


    thanks
    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 2403
    Posts
    13,406

    Re: help make a formula adding ingredient unit

    I am confused by the instructions versus the workbook sections. Do you want the formula to make what is in cell K15
    3ca 11b 3p 1cu
    or do you want the result of the math which is 659 cu?

    Edit That should be 1649 cu!!! I had the lookup table upside down.
    Last edited by FlameRetired; 02-19-2020 at 03:14 PM.
    Dave

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: help make a formula adding ingredient unit

    well if you want your result to be "3ca 11b 3p 1cu"
    then you can use this array formula. You need to enter this formula with CTRL+SHIFT+ENTER. If done so correctly { } will be added around your formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  4. #4
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    FlameRetired , yes, must match to the cu. 3 carton 11 box 3 pump 1 cup equal to 895 cup.

    3 carton = 48 box , 48+11= 59 box
    59 box = 295 pump , 295 + 3 = 298 pump
    298 pump = 894 cup , 894 + 1 = 895 pump (total)

    895 pump , it will show 3ca 11b 3p 1cu

    thanks
    Last edited by choy96; 02-20-2020 at 02:10 AM. Reason: name

  5. #5
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: help make a formula adding ingredient unit

    different approach
    Excel works with numbers with respect
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    Thanks tim201110, your formula good can add together all but not suitable because at the end table i want put a formula to check total ingredient must be matched.
    Hope can someone help me please. thanks very much.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    If you remove the space in "cu " at the end of dosydos' array entered formula then it yields the same answer as that which is being shown in cell K15 of the file attached to post #6 (L15 displays 'Yes').
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    Dear JeteMc, I dont understand what your means, can you make a example for me ?
    Thanks.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    Here is the file attached to post #6 with dosydos' array entered formula applied.
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    thanks JeteMc
    Result 4p + 4p + 3ca 10b 0p 1cu it show 3ca 10b 8p 1cu, it equal to 3ca 11b 3p 1cu . can it show 3ca 11b 3p 1cu ?

    Please help.
    Thanks very much.
    Last edited by choy96; 03-06-2020 at 03:02 AM. Reason: refer to worksheet

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    I see what you mean. I'll look closer, but as of now I don't know how that could be done.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    This proposal employs a number of helper columns which may be moved and/or hidden for aesthetic purposes.
    The first four helper columns parses dosydos formula by unit i.e. for ca: =SUM(IF(ISERROR(SEARCH("*ca",E15:J15)),0,VALUE(LEFT(E15:J15,SEARCH("ca",E15:J15)-1))))
    The rest of the help columns alternately find the MOD of each unit with respect to the next larger unit and SUMs the new value for the larger unit (if applicable).
    I.E. for MOD of p's: =MOD(S15,5)
    I.E. for SUM of b's: =IF(T15<S15,SUM(O15,INT(S15-T15)/5),O15)
    The Total cell is populated using: =W15&"ca "&V15&"b "&T15&"p "&R15&"cu"
    Let us know if you have any questions.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    Thanks again JeteMc .

    when i copy your formula on K15 to K16 , why the formula cannot work ?

    Please help.
    Thanks very much.

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    Select N15:W15 and then drag the fill handle down to W16.
    Let us know if you have any questions.

  15. #15
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    177

    Re: help make a formula adding ingredient unit

    Thanks JeteMc.
    But the adding result on some value is wrong
    1ca 11b 1p + 3b + 3b = 2ca 1b 1p 0cu
    but result is 4.2ca 1b 1p 0cu, is wrong.
    can you fix for me.

    thanks very much

  16. #16
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: help make a formula adding ingredient unit

    Please make the following two changes:
    For cell N12 and down**: =SUM(IF(ISERROR(SEARCH("ca",E12:J12)),0,VALUE(LEFT(E12:J12,SEARCH("ca",E12:J12)-1))))
    For cell W12 and down: =IF(V12<U12,SUM(N12,INT(U12-V12)/16),N12)
    **This is an array formulas which are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Let us know if you have any questions.

+ 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] Adding unit to character field
    By Solvax in forum Excel General
    Replies: 3
    Last Post: 01-12-2019, 07:17 PM
  2. [SOLVED] Need formula to count total recipes selected using named ingredient
    By Ochimus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2018, 10:40 AM
  3. Function to make calculation based on unit measurement
    By Syban in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-10-2016, 12:32 PM
  4. Formula to automatically find cost of ingredient
    By Greg7976 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-07-2015, 05:17 PM
  5. Replies: 4
    Last Post: 10-07-2015, 06:04 AM
  6. Replies: 2
    Last Post: 08-12-2014, 12:23 PM
  7. Automatically adding a unit price
    By Toolman John in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-20-2009, 09:36 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