Results 1 to 7 of 7

VBA Code to Calculate Average of Every Row

Threaded View

  1. #1
    Registered User
    Join Date
    03-16-2017
    Location
    Hamburg, Germany
    MS-Off Ver
    2016
    Posts
    44

    VBA Code to Calculate Average of Every Row

    Hello Excel Experts,

    I have a spreadsheet (attached) where rows are days of the week; columns are houses and values are Volts.
    The number of rows and columns can Change from time to time, so I want to know if there is a VBA that could do the following:

    -On the first cell of the first empty cell found write "AVERAGE" and on the first empty cell of the next column "AVERAGE X ,25". (For the example sheet I attached, it would be on M1 and N1).
    -Calculate the average of each complete row, starting at B2, post this average on M2 and then multiply this average by .25 and post on N2.
    -Repeat on each row until there is no more data.

    I have been trying to get this for a couple hours now, however from what I learned in the couple days barely allows me to look for the first empty column on the sheet.

    Thank you very much in advance!

    Jorge
    Attached Files Attached Files
    Last edited by jorgeflores; 11-02-2017 at 04:21 AM. Reason: Problem Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA code to calculate Grade Point Average (GPA)
    By Dineth in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-10-2016, 01:46 PM
  2. VBA Code to calculate the total and average values
    By tax112 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-23-2015, 08:25 PM
  3. Formula or VBA Code to calculate the total and average time
    By vutienhp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2015, 11:30 AM
  4. [SOLVED] Use the AVERAGE() function to calculate a sample average
    By alice2011 in forum Excel General
    Replies: 1
    Last Post: 09-24-2014, 08:04 AM
  5. Code to calculate the last 720 valid hours THEN give a rollin average of the data
    By joeyheaf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2012, 02:39 PM
  6. [SOLVED] VBA code to calculate Average value of number combinations
    By Chubster in forum Excel General
    Replies: 2
    Last Post: 03-28-2012, 08:50 PM
  7. Calculate average withouot incorporating sub average
    By ybu1106 in forum Excel General
    Replies: 25
    Last Post: 06-15-2010, 09:47 AM

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