Home > Forum Home > Excel Business Valuation Template > validating two columns and sum and max each column and display results Share

Validating two columns and sum and max each column and display results

Excel Help for Validating Two Columns And Sum And Max Each Column And Display Results in Excel Business Valuation Template


Forum TopicPost Reply Login

Validating Two Columns And Sum And Max Each Column And Display Results

Rate this:
(4/5 from 2 votes)
ConfusedHi,

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 on
 
There are currently no replies to the "validating two columns and sum and max each column and display results" topic of the Excel Help Forum for Excel Business Valuation Template.

Post Reply

Find relevant Excel templates and add-ins for validating two columns and sum and max each column and display results in the