Macro for "If"

%3CLINGO-SUB%20id%3D%22lingo-sub-1582800%22%20slang%3D%22en-US%22%3EMacro%20for%20%22If%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1582800%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20have%20a%20macro%20that%20will%20take%20an%20action%20based%20on%20a%20name%20entered%20into%20a%20cell%20or%20take%20another%20action%20if%20there%20is%20different%20name%20entered%20in%20that%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%3A%20If%20cell%20a1%20has%20Yellow%20entered%2C%20then%20one%20action%20is%20taken%20but%20if%20it%20has%20any%20other%20color%20or%20any%20other%20word%2C%20it%20would%20do%20something%20else.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1582800%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECommunity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590815%22%20slang%3D%22en-US%22%3ERe%3A%20Macro%20for%20%22If%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590815%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F158878%22%20target%3D%22_blank%22%3E%40Frank%20Drucker%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20ask%20your%20question%20to%20Excel%20community%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fexcel%2Fbd-p%2FExcelGeneral%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fexcel%2Fbd-p%2FExcelGeneral%3C%2FA%3E%26nbsp%3Bhere%2C%20this%20one%20to%20discuss%20the%20resource%20itself.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1602168%22%20slang%3D%22en-US%22%3ERe%3A%20Macro%20for%20%22If%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602168%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F158878%22%20target%3D%22_blank%22%3E%40Frank%20Drucker%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHello!%20You've%20posted%20your%20question%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FCommunity-Discussion%2Fbd-p%2FCommunityQuestions%22%20target%3D%22_blank%22%3ECommunity%20Discussion%20space%3C%2FA%3E%2C%20which%20is%20intended%20for%20discussion%20around%20the%20Tech%20Community%20website%20itself%2C%20not%20product%20questions.%20I'm%20moving%20your%20question%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExcel%2Fbd-p%2FExcelGeneral%22%20target%3D%22_blank%22%3EExcel%20space%3C%2FA%3E%20-%20please%20post%20Excel%20questions%20here%20in%20the%20future.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I want to have a macro that will take an action based on a name entered into a cell or take another action if there is different name entered in that cell.

 

For example: If cell a1 has Yellow entered, then one action is taken but if it has any other color or any other word, it would do something else.

 

Many thanks,

2 Replies

@Frank Drucker 

Please ask your question to Excel community https://techcommunity.microsoft.com/t5/excel/bd-p/ExcelGeneral here, this one to discuss the resource itself.

@Frank Drucker 

Hello! You've posted your question in the Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Excel space - please post Excel questions here in the future.