Check whole column and add problem VBA select case on excel?
Sub TheSelectCase4()
Select Case Range("A").Value
Case 10247700, 10431454, 10465916, 11794934
Range("c1").Value = Range("A1").Value + Range("B1").Value
Case Else
Range("B1").Value = 0
End Select
End Sub
it's only looping through one cell. I want it to look through the whole column. Then add the fields to the right of the column it's checking together. like if it found '10247700' in column A twice, the numbers(only those corresponding to the true fields) in column B should add up.
helpppp please!!
Sub TheSelectCase4()
Select Case Range("A").Value
Case 10247700, 10431454, 10465916, 11794934
Range("c1").Value = Range("A1").Value + Range("B1").Value
Case Else
Range("B1").Value = 0
End Select
End Sub
it's only looping through one cell. I want it to look through the whole column. Then add the fields to the right of the column it's checking together. like if it found '10247700' in column A twice, the numbers(only those corresponding to the true fields) in column B should add up.
helpppp please!!