mardi 31 mars 2015

How to use VBA to execute a macro based on an IF statement?

Completely new to VBA and almost completely new to macros, but I think it's the only way to do what I'm trying to do.


I want to run a macro (all it will do is delete specific cells within the same row and I've turned on relative reference so that I can apply the macro to all rows, if there's the appropriate "X") based on whether there is an X in a certain cell.


Here's what I've tried so far (the macro is just called "Biology"):


If Range("C22").Value = "X" Then Call macro_Biology End If


I should add that I'm writing this under VBA section "GetATPLabel". Like I said, total noob, but I think I'm close, so any help is appreciated.


Aucun commentaire:

Enregistrer un commentaire