Write an excel macro that calculates the average of two columns separately and writes them down using the range object command.
Please help me with this code I have no clue how to do it! Will rate.
If there is a sales report in excel if we consider Column A is Employe and Column B is Sales Y1, Column C is Sales Y2 and Column D is Average Sales. If we have 4 employes names and and each employee has two sales means year 1 sale and year2 sale(Uploaded in picture for reference).
First Employe name is Jim Bob and sale Y1 value $65,923.00 and Sale Y2 value is $70,186.00. It means Column A is Jim Bob Column B is Sales Y1(Year) $65,923.00 and Column C Sales Y2(Year) $70,186.00 for Average Sale we can take Column D
If we want to run a Macro we need VB script, so the formula for average of two columns separately with using range object command Range(D4).Formula = "=AVERAGE(B4:C4)"
In VB Script we can take new module and we need to type the formulae as given below:
Sub Enter_Formulas()
'Range(D4).Formula = "=AVERAGE(B4:C4)"
End Sub
This formula we need to type in VB Script and in Excel while implementirng the formula we run the Macros with Alt+F8 then we will get the actual range of the value in Average Sale Column D value is $68,054.50 for only Jim Bob employee average sale and we can get all the employee with same formula
Note: For the reference I have attached the picture from Excel and VB Script image. Please find the attached images with formulaes.


.
Write an excel macro that calculates the average of two columns separately and writes them down...
I am recording a simple macro that creates a data graph using two columns. When I run the macro code I keep getting the following error: Run-time error '1004': The formula you typed contains an error.• To get assistance in entering a function, click OK,then click Function on the Insert menu. • If you are not trying to enter a formula, avoid using an equal sign (=) or minus sign (-), or precede it with a single quotation mark (')....
I'm trying to write a program in C that calculates the area of a rectangle. I need to have a function that gets dimensions from a user and stores them with pointers and addresses and another function that calculates the area... my question is how do i access that values from the dimension function so that I can use it in my calculation and main function.. for example. void userDimensions(float *base, float *height){ scanf("%lf" , base); scanf("%lf", height); } float...
can someone please help me out with this? i have to write this in
vba excel.
Question 2: (40 Pointsy) The total cnerey, E. ofa movins hint i comual to energy, E, of a moving object is equal to the sum of its kinetic and potential energieS: where m is the mass (in kg) v is the velocity (in m/s) h is the height of the object (in m) g is the acceleration due to gravity (9.81 m/s') 5 m/s...
Write a program that calculates the average of a stream of non-negative numbers. The user can enter as many non-negative numbers as they want, and they will indicate that they are finished by entering a negative number. For this program, zero counts as a number that goes into the average. Of course, the negative number should not be part of the average (and, for this program, the average of 0 numbers is 0). You must use a method to read...
Write down the names and ages of 10 people. Using coin flips, divide them into two groups, as if for a randomized experiment. Did one group tend to get many of the older subjects? Was there any way to predict which group would have a higher average age in advance of the coin flips? USE R TO SOLVE THIS PROBLEM.
Please solve these two problems without using EXCEL and provide your work. Write down the formulas you used to solve the problems and solve the problems. 1. Assume your company purchased $145,305 worth of office equipment (7-year useful life) and sold it for $32,999 at the end of year 7. What is the book value of the property at the end of year 2 using MACRS depreciation and a 5% MARR. (ANSWER IS 88,956) 2. The Steinbrenner family donated $3.7...
Part A) Write a C++ program that calculates the area under a curve. Here is the equation: f(x) = x^2 +1.5x +4 You must prompt the user for the beginning and the ending x values. You are to assume, but not check, that the user will put in whole positive numbers. The units are inches. The program input/output should look something like this: This program calculates the area under a curve between two points on the x axis. The equation...
Write a Java program that calculates the sum of a variable sized matrix using a two dimensional array. (ArraySum.java) The user should provide the number of rows and columns Test multiple user inputs (3 times 2, 4 times 4, 6 times 2, etc) A sum should be created for each row, each column, and the total for the matrix Ex.: How big would you like your matrix? Rows - ? 3 Columns -? 2 Please enter your row 1? Column...
Please help me with these three questions. My prof gave them to me online and I have no clue how to do them. 1) 0.570 mol sample of carbon dioxide gas at a temperature of 23.0 °C is found to occupy a volume of 25.8 liters. The pressure of this gas sample is _______ mm Hg. 2)A sample of neon gas collected at a pressure of 590 mm Hg and a temperature of 301 K has a mass of 26.2...
Step 1. Open Excel and complete first two columns with any numbers Make 7-8 rows. Type below first column "R = " We will use Excel function CORREL(Array-1, Array-2). STEP 2. Click on cell B11 and type: =CORREL( Highlight all numbers in A-column starting with cell A2 (do not include title). That will be Array-1 (input range). Type comma after Array-1 and highlight Array-2 from B-column. Press ENTER. You will see in cell B11 Coefficient of Linear Correlation. STEP 3....