The command will run before the formula is processed, so there's no way to do this unless you can put the command in a subreport and pass the parameter from the main report to the subreport.
For information about the right way to use Commands, see my blog post here:
http://scn.sap.com/community/crystal-reports/blog/2015/04/01/best-practices-when-using-commands-with-crystal-reports
-Dell