Home > Forum Home > Excel Business Valuation Template > validating two columns and sum and max each column and display results | Share |
Forum Topic | Post Reply Login |
Validating Two Columns And Sum And Max Each Column And Display Results | Rate this: (4/5 from 2 votes) |
Hi, I dont do coding but i been stuck with a task. In Excel i have two drop down lists that have validated each other. so one row depends on the selection of another. What i need is to select a value in x drop down and then sum up the total of the value in y and find the max value of x. Then divide x with y. (finding average of total sales (y) with maximum days of the month (x)) The result then needs to be displayed in another column for each row. The code below is wrong and keeps giving me the absolute total of row y and dividing it by the max value of y. Also it only displays in one cell. Help would be massively appreciated. Thanks Sub CalculationInvestedAmount() Dim MaxDays As Integer Dim InvestmentAmount As Double Dim InvestmentTotal As Currency MaxDays = Application.WorksheetFunction.Max(Range("K:K")) InvestmentAmount = Application.WorksheetFunction.Sum(Range("F:F")) InvestmentTotal = InvestmentAmount / MaxDays ActiveCell.Value = InvestmentTotal End Sub | ||
Posted by moondog2100 on |
Replies - Displaying 1 to 2 of 2 | Order Replies By: Most Recent | Chronological | Highest Rated |
Rate this: (2/5 from 2 votes) | |
Posted by havvomer on |
Rate this: (3/5 from 1 vote) | |
Posted by snappane on |
Displaying page 1 of 1 |
Find relevant Excel templates and add-ins for validating two columns and sum and max each column and display results in the Excel Business Solutions Directory |