+ Reply to Thread
Results 1 to 50 of 50

Formula Calculation from multi cell to 1

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Formula Calculation from multi cell to 1

    Hello,

    I an seeking a help to write a formula on below mentioned details.

    In column C i have amount with limit and % for these 2. 10 is amount and limit is 50 and the % is 50/10 = 20%

    Now what i want here is i want to add new limit instead of 50 let say 80. This 80 will be * by % i.e. 80*20% = 16 (Amount). So, this 16 will be deducted from first amount which is 10 so the final answer will be 6.

    I hope this will clear you to help me to right formula in one cell.

    Sample sheet is attached for your easy reference.
    Last edited by hecgroups; 02-27-2012 at 12:18 PM. Reason: New file is attached.

  2. #2
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    can some one please

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Formula Calculation from multi cell to 1

    Already formulas are avilable in your attached workbook. What else you want is not understood.

  4. #4
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    i want to get these formulas from one cell can it be possible.

    i have 1formula in column e and another in column g but can it be possible to write a formula in he and get he calculations for all columns

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    So is the new limit going to be overwritten in column C.. or is it still going to be a new cell in column F?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for responding to mt request. I hope you have seen my sheet.

    Now what i want here is to write a formula in column H for the final result + i need to get the result in Column E & Column G from Column H. In short i want is to write a formula in Column H to calculate the result in all three columns i.e. Column E Column G & Column H.

    Can it be possible.

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    Are you looking for a formula like
    =(C4*F4/D4)-C4
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  8. #8
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for reply Mr. mikerickson

    It is showing the -10 if the cells are zero. More over i should get the results in my above mentioned columns.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    If you put this in current column H:

    =IF(F3="","",C3/D3*F3-C3)

    then delete columns E and G so that you only have left the New Limit column and the Increase Applicable column... is that what you need?

  10. #10
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for the formula.

    But i need a formula in Column H where it can calculate the calculation for column E, Column G and as well as column H.

  11. #11
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    What result do you want?

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    My formula did combine the 3 results..... to give final result... you need to delete columns E and G afterwards...

  13. #13
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for the reply but i am looking something like this

    =IF(E5=D5/C5,G5=E3*F3-G5,"")

    The above mentioned formula is not correct but the requirement which i am looking for. I am writing this formula in Column H. From Column H i am trying to calculate the other cells result and displaying the results in the columns + getting the final rest also.

    I cannot delete this information because it should be their for comparizion for the users.

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    I think you lost me....

    For the table sample you supplied... what should be the actual results in columns E, G and H. Can you repost the sheet with some variety showing expected results for each?

  15. #15
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Sample sheet is the same.

    I have written formulas in 3 difference columns but i am trying to get the results for three columns from one formula. means i don't want to write the formula in other columns but i need to display the result in their.

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    How are you going to display results in other columns without formulas? Are you looking for VBA solution?

    It's Friday... and my head is spinning...

  17. #17
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Yes you get right but i am not cure that i can be possible. This is what i am looking writing a formula in one cell get the result in other cells.

  18. #18
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    I can't help with VBA, maybe Mike can....

  19. #19
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    ooo no its cannot be done with normula formula need vba macro are you sure. But i don't want to sue macros for this. Is their any solution.

  20. #20
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    How else will you expect numbers to change without formulas?

  21. #21
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for your advice and valuable help. I am looking for formula not vba macros. Anyway thanks

    I will close the topic.

  22. #22
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    The problem is you are specifically saying you are looking for formulas... but the formulas that were offered were rejected.....

  23. #23
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    I am sorry but you misunderstood me. I did not reject the formula. Your solution is perfect but my requirement is to show the results in the other 2 columns.

  24. #24
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    How though?

  25. #25
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for your valuable and topic marked as solved now.

  26. #26
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    If you want a VBA change event, I can do that.
    I'm at work now and can't download your file.
    When I get home, I'll whop up a Change event.

    BUT, given that you are unfamiliar with VBA, a formula based spreadsheet might be best for you.
    I can almost guaruntee that you will want to change something. (Everybody changes spreadsheets.)

    Changing a formula based spreadsheet is much easier than one that uses VBA based formulas. Especialy if you don't know VBA.

    I'll post that Change event when I get home.

  27. #27
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    Put this in the sheet's code module. It should do what you want.

    Please Login or Register  to view this content.

  28. #28
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for your help and script. I will check it and provide you feedback. I thought if the topic is solved we cannot reply.

  29. #29
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Mr. mikerickson your script works very well and it is to my requirement. Therefore i have attached the final format file for your reference.

    Please note that you script is working for one row and 3 columns. This is the reason why i have uploaded new file.

    This script should worked for all the rows i.e. from 27 to 64 (New Files).

    I hope this is clear for you to help me.
    Attached Files Attached Files

  30. #30
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    That code should work on any row when data is entered in columns C, D, and/or F.

  31. #31
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for coming to help me.

    I totally agree with you. But if you see the attachment file in post 29 i have other cells also which is not working. Even the file which i have attached in my first post as sample it is not working for others cells. Can you fixed it please. I will be very thankful to you.

  32. #32
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    If you want it to act on more than one sheet, code like this should be in the ThisWorkbook code module.
    The previous code in Sheet1's code module should be removed.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  33. #33
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    But i have lot of rows in the same sheet what about that. How can i do the calculation. I am in the office now i will get back to you when i reach home

  34. #34
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    I mean the other column I.e. column K,column M, column n. I have to calculate those values also.

  35. #35
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    Change the initial value of keyRange to meet your situation.

  36. #36
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    I did not understand. I am not very much known to vba macros. Can you please explain to me in details what i have to do for columns I,J,L,P,Q,S,V,W and Z. Because these are the columns which i will work. i.e. enter new amount or delete the old amount.

  37. #37
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    I think Mike means to change:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  38. #38
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    if i change this line it will work for all the columns which i have mentioned above.

  39. #39
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    Isn't that what you want?

  40. #40
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Yes let me try and i will give you feed back

  41. #41
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    it doesn;t work for those columns

  42. #42
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula Calculation from multi cell to 1

    I will have to defer it back to Mike then... sorry.. was just trying to expedite your solution...

  43. #43
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks for your efforts. I really appreciate.

  44. #44
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    Re-reading the macro, the body has to be adjusted to accomidate other ranges.

  45. #45
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    I have tried to change the line which you have told me but it doesn't work. Can you do me a favor please. Can you write a new script including all the following columns. Because i am not very much known about VBA Macros. I will be very thankful to you please.

    C,D,F,I,J,L,P,Q,S,V,W,Z

  46. #46
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Re-reading the macro, the body has to be adjusted to accomidate other ranges.
    Hai mikerickson that's the only way cannot maintained the same format which will be easy for user to enter the values.

  47. #47
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Can some one help to finished this up and close the topic please

  48. #48
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula Calculation from multi cell to 1

    With all that data scattered around, the easiest way to do it would be to put formulas in the cells.
    Put =IF(D27,C27/D27,"") in E27
    =IF(LEN(F27)*LEN(D27),F27*E27,"") in G27
    and =IF(LEN(F27)*LEN(E27),G27-C27,"") in H27

    Then copy paste those cells to the others.

  49. #49
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Thanks mikerickson for responding to my request. Can it be done with vba macros. Your script is working very well with C, D, F Columns. I need for other columns i.e. columns I,J,L,P,Q,S,V,W and Z also can it be possible. This will be easy for users to use the file.

  50. #50
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Formula Calculation from multi cell to 1

    Hai Mr. mikerickson. Please respond to my request please.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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