+ Reply to Thread
Results 1 to 7 of 7

VBA Multiplication Formula

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Multiplication Formula

    Hi, I wonder whether someone may be able to help me please.

    The script below initially checks to see if there are any values in column B of a given page. If there are it applies a 'Sum' formula and creates a 'Totals' row on the next available row starting one column to the left.

    Please Login or Register  to view this content.
    I'd now like to add a second formula row, which will appear under the 'Totals' row, but only if it has been created. The formula I'd like to add is:

    •Use the figure in the 'Totals' row multiplied by the figure in row 3 of the relevant column.

    But I'm really not sure how to go about this.

    I just wondered whether someone may be able to look at this please and offer some guidance on how I may go about achieving this.

    Many thanks and kind regards

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: VBA Multiplication Formula

    Hi,

    I would like to help you, but I think I will need to see your workbook to fully understand the outcome that you are hoping to achieve. Could you please attach a desensitised copy of your workbook, including the macro that is supposed to run, and a detailed explanation of what value(s)/formula(s) you would like in which cells if which conditions are met (including an example of a correct outcome).

    Uploading a workbook provides me a way to get you the correct answer faster, rather than guessing what it is that you want without seeing your code in context. I hope it's not too much hassle.

    Thanks

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Multiplication Formula

    If I follow you correctly...

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 08-19-2013 at 04:13 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Multiplication Formula

    Hi @AlphaFrog, thank you very muxch for taking the time to reply to my post, and for putting the solution together, it works great!

    May I just ask please, how I can force both formula results to round to 2 decimal places?

    Many thanks and kind regards

  5. #5
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Multiplication Formula

    Hi @ajryan88, thank you for taking the time to reply to my post, it is grealty appreciated.

    As you will see I've been fortunate enough to receive a solution from @Alphafrog, so I think this perhaps superceedes the need to attach my workbook.

    Once again, many thanks for your time and kind regards

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Multiplication Formula

    This will display two decimals rounded. The values, if use in other formulas, are still full non-rounded decimal. Is that what you want?

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Multiplication Formula

    Hi @AlphaFrog, thank you very much for coming back to me so quickly. It's exactly what I was after.

    Thank you form your time and trouble, it is greatly appreciated.

    Kind Regards

+ 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. What formula to use the multiplication
    By macroashraf in forum Excel General
    Replies: 5
    Last Post: 05-24-2012, 10:36 AM
  2. multiplication formula in excel
    By v.muruganandam in forum Excel General
    Replies: 2
    Last Post: 07-25-2009, 01:30 AM
  3. Formula for Pro Rata Multiplication
    By CC_mfc in forum Excel General
    Replies: 6
    Last Post: 09-25-2007, 08:21 AM
  4. multiplication formula error
    By ZOHAR in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-21-2007, 02:10 PM
  5. Multiplication formula
    By yuvosh in forum Excel General
    Replies: 5
    Last Post: 03-05-2007, 08:05 AM

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