I want to subtract two cells in excel but only if both cells have a value. For instance, the formula I am using is thus: F2 is currently =E2-D2 but I only want this to be calculated when E2 has a value.
In my program I pass values from VB to Excel for reporting. When I pass 03-01-2009 (3rd Jan 2009), in excel it shows as 01-03-2009. I have set short date format to dd-mm-yyyy, in control panel, regional settings. Also in excel, I set cell format through VB as ... Exl.Range("A1").NumberFormat =...