here's the VB me, my VB teacher, and my Excel teacher managed to come up with in a calculate totals button:
Dim mrstMatchValueStart As String
Dim mrstMatchValueEnd As String
Private Sub cmdCalculate_Click()
Select Case Range("A3").Value
Case "Athlon"
mrstMatchValueStart = "A18"
mrstMatchValueEnd = "B30"
Case "Duron"
mrstMatchValueStart = "D18"
mrstMatchValueEnd = "E23"
Case "Pentium4"
mrstMatchValueStart = "G18"
mrstMatchValueEnd = "H31"
Case "Celeron"
mrstMatchValueStart = "J18"
mrstMatchValueEnd = "K27"
End Select
Range("D3").Value = "=Vlookup(B3," & mrstMatchValueStart & ":" & mrstMatchValueEnd & ",2,False)*C3"
Select Case Range("F3").Value
Case "Epox"
mrstMatchValueStart = "J43"
mrstMatchValueEnd = "K50"
Case "Intel"
mrstMatchValueStart = "A43"
mrstMatchValueEnd = "B60"
Case "Asus"
mrstMatchValueStart = "D43"
mrstMatchValueEnd = "E49"
Case "Abit"
mrstMatchValueStart = "G43"
mrstMatchValueEnd = "H51"
End Select
Range("I3").Value = "=Vlookup(G3," & mrstMatchValueStart & ":" & mrstMatchValueEnd & ",2,False)*H3"
Select Case Range("K3").Value
Case "PC133"
mrstMatchValueStart = "A73"
mrstMatchValueEnd = "B76"
Case "PC2100"
mrstMatchValueStart = "D73"
mrstMatchValueEnd = "E75"
Case "PC2700"
mrstMatchValueStart = "G73"
mrstMatchValueEnd = "H75"
Case "PC3200"
mrstMatchValueStart = "J73"
mrstMatchValueEnd = "K74"
Case "PC800"
mrstMatchValueStart = "M73"
mrstMatchValueEnd = "N75"
End Select
Range("N3").Value = "=Vlookup(L3," & mrstMatchValueStart & ":" & mrstMatchValueEnd & ",2,False)*M3"
Select Case Range("A7").Value
Case "ATI PCI"
mrstMatchValueStart = "A87"
mrstMatchValueEnd = "B89"
Case "ATI AGP"
mrstMatchValueStart = "D87"
mrstMatchValueEnd = "E98"
End Select
Range("D7").Value = "=Vlookup(B7," & mrstMatchValueStart & ":" & mrstMatchValueEnd & ",2,False)*C7"
End Sub