Results 1 to 9 of 9

Multiplying cells

Threaded View

epione Multiplying cells 04-10-2010, 05:06 PM
abousetta Re: Please help multiplying... 04-10-2010, 05:34 PM
epione Re: Please help multiplying... 04-10-2010, 05:54 PM
abousetta Re: Please help multiplying... 04-10-2010, 06:08 PM
epione Re: Please help multiplying... 04-10-2010, 06:19 PM
epione Re: Please help multiplying... 04-10-2010, 07:30 PM
shg Re: Multiplying cells 04-10-2010, 08:41 PM
epione Re: Multiplying cells 04-10-2010, 09:51 PM
epione Re: Multiplying cells 04-10-2010, 11:52 PM
  1. #1
    Registered User
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    37

    Question Multiplying cells

    Hi,

    I am trying to multiply some cells in VBA.

    The problem is that I use a loop (until "iteration") and the number of cell where the multiplication should be done is unknown.

    I have 5 columns and I want in in column 4 starting in E4 until "iteration#":
    take the value from column 1 (same row) * H3 +
    take the value from column 2 (same row) * H4 +
    take the value from column 3 (same row) * H5 +

    In column 5 beginning in F5 until "iteration#" I want
    take the value from column 4 * M4 + M5* N5

    \1

    If it is not much more difficult I would actually prefer to have a code that takes H4-H6 and M4-M5 and N5 from a differen sheet.

    I started off with something like this, but it wouldnt work:

    Range(Cells(4, 5), Cells(Iterations + 3, 5)).Value = Range(Cells(Iterations + 3, 5), Cells(Iterations + 3, 5)).Offset(0, -3).Value * Range("H3").Value + Range(Cells(Iterations + 3, 5), Cells(Iterations + 3, 5)).Offset(0, -3).Value * Range("H4").Value + Range(Cells(Iterations + 3, 5), Cells(Iterations + 3, 5)).Offset(0, -3).Value * Range("H5").Value

    Range(Cells(4, 6), Cells(Iterations + 3, 6)).Value = Range(Cells(Iterations + 3, 6), Cells(Iterations + 3, 6)).Offset(0, -1).Value * Range("M4").Value + Range("N5").Value * Range("M5").Value
    I would appreciate any help asap!!

    Cheers
    Attached Images Attached Images
    Last edited by epione; 04-11-2010 at 09:37 PM.

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