+ Reply to Thread
Results 1 to 6 of 6

Macros to multiply values in two different cells

  1. #1
    Registered User
    Join Date
    05-30-2014
    Posts
    7

    Macros to multiply values in two different cells

    Hi, I am fairly new to macros programming.
    I need your help.
    I have a file that needs to multiply values in columns B and C and places the total in column D (starting of course in D2) when the update button is pressed regardless of how many rows are there in the sheet.
    Please see attached sample file.
    Thank you everyone.
    Your inputs are gonna be highly appreciated.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Macros to multiply values in two different cells

    A great learning tool is recording macros and this seems like a perfect candidate for it.

    Just type in the formula you want in cell D2, go to View > Macros > Record Macro, and then just use the autofill (double click on bottom right of the box of the you just typed in). Then stop recording and look to see what the macro says.

    If you want it to be able to run multiple times with different lengths of data you will need to probably build in something (or record) to clear out the cells that are there.

    This is what I got when doing a very simple recording. You can then edit it afterward to include anything it is not doing

    Please Login or Register  to view this content.
    Then you just need to right click on your button and goto Assign Macro and choose the macro you just recorded.
    Last edited by Hawkeye16; 05-30-2014 at 05:11 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Macros to multiply values in two different cells

    maybe
    Book2 wif macro.xlsm

  4. #4
    Registered User
    Join Date
    05-30-2014
    Posts
    7

    Thumbs up Re: Macros to multiply values in two different cells

    Quote Originally Posted by kalak View Post
    Thank you Kalak! I got the reply I was looking for.

  5. #5
    Registered User
    Join Date
    05-30-2014
    Posts
    7

    Re: Macros to multiply values in two different cells

    Thank you for the quick response. You guys are the best!

  6. #6
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Macros to multiply values in two different cells

    If the question is solved make sure to mark the thread solved and Add Reputation to all those who helped!

+ 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. Multiply Cells Which Have Values By a Formula
    By Jrub in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2012, 11:02 AM
  2. Replies: 2
    Last Post: 06-13-2012, 11:20 AM
  3. Copy one sheet to another with macros and multiply numbers when copying
    By talhawahab in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2011, 01:57 AM
  4. 3 "w" cells,multiply the values next to them
    By jonfouk in forum Excel General
    Replies: 1
    Last Post: 04-09-2008, 01:13 PM
  5. Replies: 1
    Last Post: 03-14-2006, 05:55 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