Very new to VBA, wanting to learn more. I'm trying something that I could easily do using formulas in a spreadsheet, but I want to learn how to code it.
I basically want to tell the user to select two cell ranges of the same length and multiply them together to return a value. For the purposes of what I would use it for, I'm calculating market values of stocks given the market price and number of shares.
I've the set up, but I don't know what I do to multiply together or return the value
Sub CalculateMV()
Dim Rng As Range Dim Rng2 As Range
Set Rng = Application.Selection Set Rng = Application.InputBox("Select All Market Values", "MV Calculator", Type:=8)
Dim rng3 As Range
Set rng3 = Application.Selection Set rng3 = Application.InputBox("Select All Market Values", "MV Calculator", Type:=8)
For Each Rng2 In Rng
Is there something large (fundamentally) that I'm missing, like an array or I need to write a function?
Thanks in advance.