+ Reply to Thread
Results 1 to 6 of 6

Multiply a range of numbers by a cell ?

  1. #1
    Registered User
    Join Date
    11-26-2006
    Posts
    3

    Multiply a range of numbers by a cell ?

    Is it possible to multiply an arrange of numbers by a cell?

    For example:

    A B
    1 x
    2
    3
    4
    5

    Is there a way to multiply A2:A6 by whatever value is in B2? I want to be able to change B2 and have the numbers in A2:A6 change.

    Thanks,
    Bob

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =SUMPRODUCT(A2:A6)*B2


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Do you mean =A2*$B$2 ... in cell C2 ...
    and copied down ... ?

    HTH
    Carim

  4. #4
    Registered User
    Join Date
    11-26-2006
    Posts
    3
    That's not what I meant.

    I want to multiply the numbers in the array by the cell, where the numbers in the array don't change but the number in the single cell can. If C2 = 2, then I would want A to look like...

    A B
    2 2
    4
    6
    8
    10

    If I changed C2 to be 3, then I would want A to look like...

    A B
    6 3
    9
    12
    15
    18

    I don't care if the results of the multiplication are in a new array of cells eg.

    A B C
    1 6 3
    2 9
    3 12
    4 15
    5 18

    Here A2:A6 is multiplied by the value of C2, and the results are displayed in B2:B6 instead of replacing the values of A2:A6.

    Thanks,
    Bob
    Last edited by Table10sHotShot; 11-26-2006 at 03:51 PM.

  5. #5
    Registered User
    Join Date
    11-26-2006
    Posts
    3
    Nevermind I got it working with the $'s... thanks guys.

    Thanks,
    Bob

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    You can also get it done with an event macro
    Please Login or Register  to view this content.
    HTH
    Carim

+ 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