Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i insert "If function" in a macro?
I have a recorded macro and i would like to insert a condition, if "Y
then copy ove -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i insert "If function" in a macro?
madcat
Note IF statement tests are case sensitive if range("a2") = "Y" then do something end if or if range("a2") = "Y" then do something elseif range("b3")="N" then do something else else do some other thing end if you can also use Select Case Select case range("a1") case "Y" do something case "N" do somr other thing case "T" do something else end selec -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
Insert "Proper Function" into existing macro | Excel Worksheet Functions | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
Is it possible to insert a macro command in an "IF" function? | Excel Worksheet Functions | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |