I need to calc the time between two dates. If column V is blank, then look at column X; now return the difference btw the returned value (either X or V) and the date in column S.
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
- DoCmd.TransferSpreadsheet is not recognizing works
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
- How to create a hyperlink to a different Excel she
For row 1, you could use
It is extremely important to note that blank and an empty string behave differently. This shows up once and again, and it is a source of quite a bit of trouble. Any formula or code should account for this, according to the demands of the task.
In addition, you have to select an appropriate number format. For instance, use Custom, and in Type use dd"d" hh:mm.
Maybe
In words: If cell V2 is blank, calculate S2 minus X2, otherwise calculate S2 minus V2.
Adjust to your needs.