I have two cells, O14 and U14 that contain variables. The code works when Cell O14=5 and U14 =1 and the code works if O14=3 but when O14=5 and U14 = anything else the last set of code for ELSE: does not run. What am I doing wrong?
Code:
Sub Dump_Data()
If Range("o14").value = 5 And Range("u14") = 1 Then
Range("dq30").Copy
Range("f18").Select
ActiveSheet.Paste Link:=True
Range("ds30").Copy
Range("f19").Select
ActiveSheet.Paste Link:=True
Range("du5").Copy
Range("ak19").PasteSpecial
Range("du6").Copy
Range("ao19").PasteSpecial
Range("du7").Copy
Range("as19").PasteSpecial
Range("du8").Copy
Range("aw19").PasteSpecial
Range("du9").Copy
Range("ba19").PasteSpecial
Range("du10").Copy
Range("be19").PasteSpecial
Range("dy30").Copy
Range("a14").PasteSpecial
ElseIf Range("o14").value = 3 Then
Range("dq30").Copy
Range("f18").PasteSpecial
Range("ds30").Copy
Range("f19").PasteSpecial
Range("dt30").Copy
Range("ak19").Select
ActiveSheet.Paste Link:=True
Range("du30").Copy
Range("ao19").Select
ActiveSheet.Paste Link:=True
Range("dv30").Copy
Range("as19").Select
ActiveSheet.Paste Link:=True
Range("dy30").Copy
Range("a14").PasteSpecial
Else: Range("dq30").Copy
Range("f18").Select
ActiveSheet.Paste Link:=True
Range("ds30").Copy
Range("f19").Select
ActiveSheet.Paste Link:=True
Range("du5").Copy
Range("ak19").PasteSpecial
Range("du6").Copy
Range("ao19").PasteSpecial
Range("du7").Copy
Range("as19").PasteSpecial
Range("du8").Copy
Range("aw19").PasteSpecial
Range("du9").Copy
Range("ba19").PasteSpecial
Range("du10").Copy
Range("be19").PasteSpecial
Range("dy30").Copy
Range("a14").PasteSpecial
End If