Hi all,

I am having trouble with the following code. What I would like to happen is... if 'YieldLossCost' is a valid number (sometimes the intersection may return a non number), I want it to display "There is no data relating to this melt route and stage. Either it is not relevant or is missing." If there is no value inputted into 'YieldLossWeightText', I would like it to display "Please enter a yield loss weight!". Only if both conditions are met would I like the calculation to performed and the value entered into C6... Any ideas?


'just part of code. Yield loss cost refers to the intersection of rng1 and rng2.
YieldLossCost = Intersect(rng1.EntireRow, rng2.EntireColumn).Value
    If IsNumeric(YieldLossCost & vbNullString) = True Then
    If IsNumeric(YieldLossWeightText) = True Then
      
        YieldLossCost = YieldLossCost * Form.YieldLossWeightText.Value
        Sheets("Cost Calculator").Range("C6") = YieldLossCost
      Else
        MsgBox "There is no data relating to this melt route and stage. Either it is not relevant or is missing."
      Exit Sub
      End If
    
        MsgBox "Please enter a yield loss weight!"
    Exit Sub
    End If
Thanks in advance.