Home |
Search |
Today's Posts |
#1
|
|||
|
|||
if then else statement also using "and"
I am trying to use the following but it isn't working properly. Can someone
please advise what I am doing wrong? If Sheets("E").Range("C8").Value = "1" And Sheets("E").Range("C2").Value = "Yes" Then Sheets("1").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True ElseIf Sheets("E").Range("C8").Value = "1" And Sheets("E").Range("C2").Value = "No" Then Sheets("1").Select Rows("24:27").Select Selection.Delete Shift:=x1Up ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Else Sheets("STEP 2").Select End If Any help would be greatly appreciated.... |
#2
|
|||
|
|||
if then else statement also using "and"
Amanda, I have modified your code to show how it should be written If Range("E2") And Range("F2").Value = "1" Then Range("A1").Select End sub End If ' End Sub Ashley -- Ashley Frank ------------------------------------------------------------------------ Ashley Frank's Profile: http://www.excelforum.com/member.php...o&userid=26488 View this thread: http://www.excelforum.com/showthread...hreadid=483378 |
#3
|
|||
|
|||
if then else statement also using "and"
Amanda, Sorry, mis-understood. It should be If (Range("E2").Value = "1") And (Range("F2").Value = "YES") Then Range("A1").Select Else End If ' End Sub ashley -- Ashley Frank ------------------------------------------------------------------------ Ashley Frank's Profile: http://www.excelforum.com/member.php...o&userid=26488 View this thread: http://www.excelforum.com/showthread...hreadid=483378 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Long IF Statement | Excel Discussion (Misc queries) | |||
IF Statement problem | New Users to Excel | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
How do I fix a circular reference in a financial statement? | Excel Discussion (Misc queries) |