View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default create macros that uses if-then-else statments

Ross,

All one line for each (be careful of word wrap):

If Range("A1") = var1 Then Worksheets("print statement 1").printout
copies:=1

John

"Ross K" wrote in message
...
I am new to using Macros and am looking for info on creating macros which

will allow me to use if-then-else statements based on set variables and then
print out the results of the conditional statement. For example: if
content of cell A1=var1, print statement1, elseif content cell A1= var2
print statement2, elseif content cell A1= var3 print statement3 and so on up
to var12. All content will be text If someone could point me in the right
direction to learn about this it would be greatly appreciated, Thanks, Ross
K.