Results 1 to 5 of 5

Range sum, multiplication

Threaded View

Vladi108mb Range sum, multiplication 05-12-2020, 03:51 PM
mehmetcik Re: Range sum, multiplication 05-12-2020, 05:25 PM
Vladi108mb Re: Range sum, multiplication 05-12-2020, 06:55 PM
alansidman Re: Range sum, multiplication 05-12-2020, 07:06 PM
Vladi108mb Re: Range sum, multiplication 05-12-2020, 07:48 PM
  1. #1
    Registered User
    Join Date
    05-12-2020
    Location
    Lima,Peru
    MS-Off Ver
    2016
    Posts
    25

    Range sum, multiplication

    Hello Masters of the Universe of VBA Excel
    I am starting to use VBA Macro and I search try to find a way to reduce this code that I need replicate many times.
    All cells have integers. Cells(19,6) is a constant value.
    How I can reduce this operations? Using a variable?
    Please guide me with your expertise.

    Thanks

    Sheets("PxP").Cells(49, 4) = ((Cells(19, 6) + Cells(15, 4)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 5) = ((Cells(19, 6) + Cells(15, 5)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 6) = ((Cells(19, 6) + Cells(15, 6)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 7) = ((Cells(19, 6) + Cells(15, 7)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 8) = ((Cells(19, 6) + Cells(15, 8)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 9) = ((Cells(19, 6) + Cells(15, 9)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 10) = ((Cells(19, 6) + Cells(15, 10)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 11) = ((Cells(19, 6) + Cells(15, 11)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 12) = ((Cells(19, 6) + Cells(15, 12)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 13) = ((Cells(19, 6) + Cells(15, 13)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 14) = ((Cells(19, 6) + Cells(15, 14)) / 2) * Cells(15, 2)
    Sheets("PxP").Cells(49, 15) = ((Cells(19, 6) + Cells(15, 15)) / 2) * Cells(15, 2)
    Last edited by alansidman; 05-12-2020 at 07:05 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Value Multiplication
    By jani.pk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2019, 03:48 PM
  2. [SOLVED] Sequential multiplication of numbers in range
    By T.I. in forum Excel General
    Replies: 5
    Last Post: 04-30-2019, 05:15 PM
  3. [SOLVED] Sum of multiplication and add-up
    By Seifptv in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2018, 07:42 PM
  4. [SOLVED] Product and IF multiplication of percentage on range in different tab
    By brooksteen in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-06-2017, 10:28 AM
  5. Replies: 1
    Last Post: 07-20-2012, 11:34 AM
  6. Subset a range for array multiplication
    By mpm166 in forum Excel General
    Replies: 5
    Last Post: 04-16-2012, 06:57 PM
  7. Multiplication
    By kmarie630 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2009, 03:59 PM

Tags for this Thread

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