Question

I need the code of a list in VBA excel of this question. 3) Which is...

I need the code of a list in VBA excel of this question.

3) Which is the best ENG engine model that has the highest MPG, lowest CYL cylinder and least WGT Weight in this table?

0 0
Add a comment Improve this question Transcribed image text
Answer #1


Sub Largest()
'Cells with dates also return a value, and get covered for determining largest value. Percentages will convert and return numerics.

Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Dim mpg As Integer
Dim cyl As Integer
Dim wgt As Integer

'Set range from which to determine largest/smallest value
Set rng1 = Sheet1.Range("A2:A10")
Set rng2 = Sheet1.Range("B2:B10")
Set rng3 = Sheet1.Range("D2:D10")

'Worksheet function MAX returns the largest value in a range
'Worksheet function MIN returns the smallest value in a range

mpg = Application.WorksheetFunction.Max(rng1)
cyl = Application.WorksheetFunction.Min(rng2)
wgt = Application.WorksheetFunction.Min(rng3)

'Displays largest/smallest value
MsgBox mpg
MsgBox cyl
MsgBox wgt


End Sub

Add a comment
Know the answer?
Add Answer to:
I need the code of a list in VBA excel of this question. 3) Which is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need this problem to be solved in Excel VBA code. Need full code in VBA....

    I need this problem to be solved in Excel VBA code. Need full code in VBA. Please solve 1st Task : '5 or 0'. Please help me urgently with proper answer and coding solutions which I can run in Excel/vba. Thanks Course: Programming languages Second laboratory work File and string processing Create a program that processes text file according to task variant. Requirements: 1. Create text file (use notepad) with some lines of data according to task variant. 2. Ask...

  • ASAP. I need VBA code, for Excel please 5. Create text file with notepad. Each line...

    ASAP. I need VBA code, for Excel please 5. Create text file with notepad. Each line contains only one word. Open it and, if the word begins with capital letter, output it to column A, otherwise in column B.

  • I need help writing a VBA code for aging accounting receivables for 30, 60, 90 days...

    I need help writing a VBA code for aging accounting receivables for 30, 60, 90 days in Excel.

  • Also: Based on the regression results, solve for the predicted MPGavg for 8 cylinder cars. and Based on the regression...

    Also: Based on the regression results, solve for the predicted MPGavg for 8 cylinder cars. and Based on the regression results, what is the best answer concerning average MPG for 4 cylinder SUVs. a. 4 cylinder SUVs have statistically higher average MPG when compared to 8 cylinder SUVs. b. The number of cylinders does not help explain average MPG. c. 6 cylinder SUVs do not have statistically higher average MPG when compared to 8 cylinder SUVs. d. 4 cylinder SUVs...

  • Hi, I need help with excel. I need to find the highest and lowest score from...

    Hi, I need help with excel. I need to find the highest and lowest score from different soccer matches. For example; match 1 = (2 - 0) match 2 = (3 - 1) match 3 = (0 - 1) match 4 = (2 - 3) How can I use index, max, min and match functions to automatic find the highest and lowest scores ? for example, match 4 = highest, match 3 = lowest. Excel edition 2016 There is basically...

  • i need the excel formula 3. Write either the R code or Excel formula that gives...

    i need the excel formula 3. Write either the R code or Excel formula that gives us the answer to the following question. We are testing a one-tailed test, with all 5% of our critical value on the left-hand side of the distribution. What raw score value marks the critical value of this test, if the mean of the distribution is 500 and the standard deviation is 100? Paste the code in the Word file. 3. Write either the R...

  • can someone please help me out with this? i have to write this in vba excel....

    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...

  • Matlab Questions (please show what code I need, including any comments): You are asked to design...

    Matlab Questions (please show what code I need, including any comments): You are asked to design a water storage tank with a capacity of 1,000 liters. The tank will be fabricated from stainless steel (rolled sheet), which cost $100/ sq. m. You are asked to consider three possible designs for the tank: Option 1 – a cube; Option 2 – a cylinder; Option 3 – a sphere. Calculate the cost of each of these designs and report the least expensive...

  • I need help on this question. I would like it in excel format, thank you. -u...

    I need help on this question. I would like it in excel format, thank you. -u parcen, wiat is the current bond price? market IMterest iate vn Jones Corporation has zero coupon bonds on the market with a par of Question 3. s1.000 and 8 years left to maturity. If the market interest rate on these bonds is 6 percent. what is the current bond price? (Use the semi-annual interest payment model.)

  • Please Help. C++. Need 3 attributes and 3 methods added to the code below. Need the...

    Please Help. C++. Need 3 attributes and 3 methods added to the code below. Need the prototype added to the .h file......and the implementation in the .cpp file....thanks! edited: I just need the above and then I was told to use the methods in the main program; for the vehicle. Any 3 attributes and any three methofds. source.cpp file // Header Comment #include #include #include #include "Automobile.h" using namespace std; struct Address{ string street; string city; string state; string zip;...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT