Hi guys,
I'm wandering whether it is possible to place several if statements inside overarching if statements in VBA in the same way you can do it using formulas.
So for instance, I have two overarching if statements which are:
If Sheets("Parent Input").Range("C7").Value = "UK" Then
and
If Sheets("Parent Input").Range("C7").Value = "DE" Then
So if the first is true then:
If Sheets("Child Input").Range("E:F").EntireColumn.Hidden = False Then
Sheets("Helper cells").Range("11:11").Copy
Sheets("Output (UK)").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues
Application.CutCopyMode = False
End If
and if the second is true then:
If Sheets("Child Input").Range("E:F").EntireColumn.Hidden = False Then
Sheets("Helper cells").Range("11:11").Copy
Sheets("Output (DE)").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues
Application.CutCopyMode = False
End If
Note that the output sheet being copied to is different in the last two bits of code above.
Hence it would be an IF following on from the initial IF.
Eventually I want to end up with lots of further IFS following on from the overarching one.
Any ideas how I would go about this? (I hope I have explained this adequately though I think probably not)
Massive thanks in advance for any help
Strud
Bookmarks