+ Reply to Thread
Results 1 to 19 of 19

Add formula function to Ribbon

Hybrid View

dontgetit Add formula function to Ribbon 06-22-2018, 08:05 PM
jeffreybrown Re: Add formula function to... 06-22-2018, 08:15 PM
dontgetit Re: Add formula function to... 06-22-2018, 08:35 PM
jeffreybrown Re: Add formula function to... 06-22-2018, 08:51 PM
dontgetit Re: Add formula function to... 06-22-2018, 09:08 PM
alansidman Re: Add formula function to... 06-22-2018, 09:09 PM
jeffreybrown Re: Add formula function to... 06-22-2018, 09:10 PM
dontgetit Re: Add formula function to... 06-22-2018, 09:26 PM
jeffreybrown Re: Add formula function to... 06-23-2018, 09:55 AM
dontgetit Re: Add formula function to... 06-27-2018, 05:35 PM
jeffreybrown Re: Add formula function to... 06-27-2018, 06:29 PM
dontgetit Re: Add formula function to... 06-27-2018, 06:44 PM
jeffreybrown Re: Add formula function to... 06-27-2018, 06:51 PM
dontgetit Re: Add formula function to... 06-27-2018, 07:12 PM
jeffreybrown Re: Add formula function to... 06-27-2018, 07:22 PM
dontgetit Well thanks for trying... 06-27-2018, 07:49 PM
Gregor y Re: Add formula function to... 06-27-2018, 07:46 PM
dontgetit I will try this when I get... 06-27-2018, 07:51 PM
Gregor y Re: Add formula function to... 06-27-2018, 08:45 PM
  1. #1
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Add formula function to Ribbon

    On the Home ribbon I would like to add the =Round function in the editing section where the autosum appears. Is there a way to do this? I found where to customize the ribbon, but it doesn't allow me to add this specific function.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    How do you intend to use this =Round function?

    Is it just on your copy of Excel or is your intention to have this as part of a workbook for any and all users?

    I dont get it!
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    This is just for my personal copy of Excel. I was using the Autosum button before for quick access, but it was causing problems with my formulas. Chatted with a friend and discovered that I need to use =ROUND(x*y,2) instead of =SUM(x*y). This fixed my problem, but now it will take a few more keystrokes or clicks to enter in whereas before I was simply clicking the Autosum button. I hope that makes sense.

    Lol, I couldn't think of a better name

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    One option...

    Put this macro in your VBE in a module and then attach it to the QAT or even to the ribbon
    Sub MyRound()
        ActiveCell.FormulaR1C1 = "=ROUND(RC[-2]*RC[-1],2)"
    End Sub
    On the ribbon...

    File >> Options >> Customize ribbon >> Create New Group (Place it on the Home tab or wherever)

    Next >> Choose commands from >> Macros >> Select MyRound >> Click Add (Of course to the New Group you just created)

    QAT...

    Same as steps above, but instead of select Customize ribbon, select right below, Quick Access Toolbar.

    Now this macro is at your finger tips with one click.

    Note: This assumes the x and y are right next to each other.
    Example:
    A1 (x) B1 (y) and round will be in C1
    H32 (x) I32 (y) and round will be in J32

    Hope this makes sense!

  5. #5
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    Thanks for your reply! I think I can follow most of these steps, they make sense. However, I don't know how to put a macro into a VBE. Steps please?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,743

    Re: Add formula function to Ribbon

    More of what Jeff proposes

    https://www.youtube.com/watch?v=dmdolFcS-fI
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    See if this helps...

    http://www.rondebruin.nl/win/code.htm

    Thanks Alan!

  8. #8
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    Followed all of the steps in the link you provided. Was able to create the macro and add the new button to my ribbon perfectly. Thank you for that!

    Only problem is that it does not work as a formula now. Perhaps it will help if I explain exactly what I am trying to do.

    I am creating customer invoices. So column F is price per unit, G is quantity, and H is total (F*G)

    For F I enter my cost for the unit, and multiply by the percentage I want to mark it up. This becomes a problem when rounding is involved and causes H to be wrong sometimes. This is why I need the ROUND formula instead of regular Autosum.

    Example:

    F11: =SUM(20.35*1.15)=23.40
    G11: 2
    H11: =SUM(F11*G11)=46.81 Obviously this is incorrect as it should be 46.80

    When I enter F11 as =ROUND(20.35*1.15,2) then everything tallies correctly.

    The problem with this is it requires much more typing on my part instead of the quick autosum button that I was using before. This is why I am trying to add the Round function to the Ribbon

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    Can you put together a sample mock-up sheet with what you have and what you expect?

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    I am sorry it took me so long to get back here; it has been a hectic week.
    I am going to attempt to attach a sample document with the formulas I am talking about.
    The first line shows it when I use the AutoSum button.
    I like the use of this button because it is quick and simple, however it is producing a rounding issue for my invoices.
    The second line shows the same amount but calculated with the =Round function instead.
    This produces the correct value, but requires several more keystrokes on my part, which will really slow me down when doing invoices.
    I would like to be able to have a button identical to the AutoSum button in the Ribbon, but have it be the =Round formula instead of =Sum.
    Attached Files Attached Files

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    I need to ask...

    In cell F4, you actually hard code 20.35 * 1.15 into the formula?? You keep saying "several more keystrokes", but if you are hard coding =Round(20.35*1.15,2) then that's a lot of keystrokes.

    Sorry, but I'm still not understanding.

    See if this helps. In H3:H5, you can get the =Round formula in that cell in three relatively easy ways.

    1) Double click and cell (H3:H5)
    2) Use a keyboards shortcut with any cell (H3:H5) >> Ctrl + Shift + F
    3) Use the new tab on the ribbon and select the button >> MyRound
    Attached Files Attached Files
    Last edited by jeffreybrown; 06-27-2018 at 06:44 PM.

  12. #12
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    I am unsure what you mean by hardcode.

    In F3 I simply click on AutoSum in the top right corner of the Ribbon, then type 20.35*1.15, then press tab. This automatically calculates the formula and then tabs me over to G3.

    In F4 I typed out the entire formula to get it to use the round function. This is what I am trying to shortcut. I need to use the round function in order to have the H column come out with the correct answer. Unless you know of a better way to achieve this.
    Last edited by dontgetit; 06-27-2018 at 06:47 PM. Reason: fix typos

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    Please see my attachment. By hardcode, I mean you physically type in 20.35, the times sign, and then 1.15.

    In the attachment in post number #11, why not type the 20.35 in cell F3, 1.15 in cell G3, and then double click H3 to get the formula results.

  14. #14
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11

    Re: Add formula function to Ribbon

    Because this is a customer invoice that I print off and hand to the person. They might have 10 parts that each cost me a different amount of money. I then take that part and mark it up, in this case 15%. This is why it is $20.35 (my cost) times 1.15 (which equals their cost with the 15% markup). Then column G is how many were used. In this case there were two of whatever part used in their repair, making the end total for that particular part $46.80. Just like your receipt would read if you bought 5 of the same item from a store.

    I do not maintain a regular inventory list for most parts because there are thousands of parts that could be used on all of the different equipment we service. Therefore we order what is needed on a case by case basis. Since this is how we order there are occasional price fluctuations from our wholesalers that would make maintaining a set price sheet more time consuming than its worth.

    To make bookkeeping easier, I like to leave our cost hidden in the formula so that I can quickly open my version of the document and see exactly how much we paid for said part, and how much we marked up, on any given invoice . Rather than having to dig though the file cabinet to find old purchasing receipts.

    Does that make more sense?

  15. #15
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add formula function to Ribbon

    Does that make more sense?
    Not entirely I'm afraid, in the sense this does not appear to be an Excel issues per se, it's more a procedural practice.

    Anyway, I posted a notice in our help area to see if anybody else has a suggestion. Sorry...

  16. #16
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11
    Well thanks for trying anyways!

    Maybe someone over there will have a way to help.

  17. #17
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    280

    Re: Add formula function to Ribbon

    for what it's worth I believe you want to do this instead:
    1. open your workbook
    2. File(tab)>Options(list entry)>Advanced(list entry)
    3. scroll most of the way down to the "When calculating this workbook" section
    4. select your workbook
    5. check the box that says "Set precision as displayed"
    6. it'll whine at you, click ok, then ok again to close the options dialogue box

    now you should be able to:
    1. click cell F4
    2. type: =20.35*1.15
    3. tab key
    4. 2
    5. tab key
    6. type =
    7. left-click F11
    8. type *
    9. left-click H11
    10. enter/tab key(your preference, enter should take you to the next row though)
    Last edited by Gregor y; 06-27-2018 at 07:47 PM. Reason: *1.15 not *0.15
    If it'd make you feel better using my answer because of my street cred, then you can go ahead and click Add Reputation below to improve it.

  18. #18
    Registered User
    Join Date
    06-22-2018
    Location
    Kansas
    MS-Off Ver
    2016 Home/Student
    Posts
    11
    I will try this when I get back home. Thanks!



    Quote Originally Posted by Gregor y View Post
    for what it's worth I believe you want to do this instead:
    1. open your workbook
    2. File(tab)>Options(list entry)>Advanced(list entry)
    3. scroll most of the way down to the "When calculating this workbook" section
    4. select your workbook
    5. check the box that says "Set precision as displayed"
    6. it'll whine at you, click ok, then ok again to close the options dialogue box

    now you should be able to:
    1. click cell F4
    2. type: =20.35*1.15
    3. tab key
    4. 2
    5. tab key
    6. type =
    7. left-click F11
    8. type *
    9. left-click H11
    10. enter/tab key(your preference, enter should take you to the next row though)

  19. #19
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    280

    Re: Add formula function to Ribbon

    although once the option is turned on, you could just as easily use your original entry method where you click the auto-sum button since Excel will now calculate off the digits shown instead of the ones "behind the scenes". It's just that when you use the auto-sum button it wraps the arithmetics you want to do 20.35*1.15 inside a =SUM(...) function which really does nothing, and this looks weird to people when they read the contents of the cell =SUM(20.35*1.15) because it's kinda like asking what's the sum of five? Five, when you don't add it to anything it is still five you tricky fox, but usually when people use the =SUM(...) formula they give it more than one thing =SUM(20.35*1.15, 16.45*1.15, 5.05*1.15) so the question becomes what's the sum of five, two and three? Ten, on most hands.

+ 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. Put VBA ribbon together with Custom UI Editor Ribbon
    By czarlando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2016, 05:46 AM
  2. [SOLVED] Ribbon Change based on Non-Ribbon Object
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-07-2014, 01:18 PM
  3. keyboard function on the ribbon
    By lostsoul65 in forum Excel General
    Replies: 2
    Last Post: 11-03-2014, 09:24 PM
  4. [SOLVED] An alternative to the Add-Ins ribbon tab - Global Custom Ribbon Tab by Ken Puls
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 10:01 PM
  5. Disable Insert and Delete Row Function on Ribbon
    By oracle259 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2014, 01:50 PM
  6. Replies: 0
    Last Post: 01-16-2013, 12:53 PM
  7. Ribbon - Multiple xlam adding into single Ribbon tab
    By gooopil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2011, 03:40 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