+ Reply to Thread
Results 1 to 4 of 4

Multiply a range with another set of values or range with vba

Hybrid View

  1. #1
    Registered User
    Join Date
    03-27-2013
    Location
    Taiwan
    MS-Off Ver
    Excel 2007
    Posts
    5

    Multiply a range with another set of values or range with vba

    Hi,
    I'm new here and basically new with vba, one of the post here have almost the same problem with mine, it is being able to enter a value into a cell (within a specified range if necessary) and have it automatically multiply by a another range or set of values and overwrite the original entry with the result so making it all happen within one cell.
    My range D3:D37 have values, then i want it to automatically multiply with my E3:E37 column with the numbers i will manually input.

    Thank you very much, I am really hoping someone will be able to help me.

  2. #2
    Registered User
    Join Date
    03-31-2012
    Location
    Warszawa
    MS-Off Ver
    Excel 2013
    Posts
    32

    Re: Multiply a range with another set of values or range with vba

    Hi,
    Maybe try to record a macro
    http://www.youtube.com/watch?v=KKJj78LoFaA

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Multiply a range with another set of values or range with vba

    Maybe:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("E3:E37")) Is Nothing Then
    
        Target.Offset(, -1).Value = Target.Value * Target.Offset(, -1).Value
        
    End If
    
    End Sub

  4. #4
    Registered User
    Join Date
    03-27-2013
    Location
    Taiwan
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Multiply a range with another set of values or range with vba

    Hi John,

    Thanks for your help but what I want to do is this,
    B C D E
    BRAND X 1KG 500
    BRAND Y 2KG 400
    BRAND Z 3KG 300

    The E column which is the E3:E37 range I have for the meantime is blank, but I will manually input a value in the E column and want it to automatically multiply with the corresponding value in column D which is the D3:D37 with a set of values, but i want the product of D and E to overwrite the value i put in the column E.
    Sorry I really don't know how to make my question more simple. Really hope you could help me with this.

    Thank you very much in advance.
    Last edited by Yoona; 03-27-2013 at 09:34 PM.

+ 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