excel - Macro to run different macros by criteria - depending on if specific cells are empty/not -
i have excel file defined macros opening specific ppt files. i'm looking vba code run specific macro based on if cells empty , other not.
for example: if cells b1 , b2 empty cell b3 isn't --> run macro1 if cells b1, b2 & b3 empty cell b4 isn't --> run macro2
is possible? many thanks!
thanks quick answer! chances missed there... report 3 should activated when d8 & d9 not empty , d10 empty (sorry other way)
sub choose_macro() dim v variant worksheets("reports") v = application.match(chr(42), .range("d8:d11"), 0) if not iserror(v) select case clng(v) case 3 report_3 case 4 report_4 case else 'do nothing end select end if end end sub
Comments
Post a Comment