Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If / And / Or Macro
Basic question: I am trying to write a macro that looks to see whether A1 =
"X" and also if any of A2...10 = "Y", then Statement A, else Statement B. Thank you in advance. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If / And / Or Macro
Try this
=IF(AND(A1="x",COUNTIF(A2:A10,"y")0),"Statement A","Statement B") Mike "Graeme" wrote: Basic question: I am trying to write a macro that looks to see whether A1 = "X" and also if any of A2...10 = "Y", then Statement A, else Statement B. Thank you in advance. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If / And / Or Macro
Mike - thanks for the quick response. I see how this would work as an excel
formula, but if it's a line of code in a macro, does it need to be expressed differently? thanks. "Mike H" wrote: Try this =IF(AND(A1="x",COUNTIF(A2:A10,"y")0),"Statement A","Statement B") Mike "Graeme" wrote: Basic question: I am trying to write a macro that looks to see whether A1 = "X" and also if any of A2...10 = "Y", then Statement A, else Statement B. Thank you in advance. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If / And / Or Macro
Please state your question in the context of its environment. Don't waste
our time. Tyro "Graeme" wrote in message ... Basic question: I am trying to write a macro that looks to see whether A1 = "X" and also if any of A2...10 = "Y", then Statement A, else Statement B. Thank you in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |