skull_eagle
Board Regular
- Joined
- Mar 25, 2011
- Messages
- 89
Hi,
I've written the below formula and it work fine, It works out the Min and max years in a range eg. 1998 - 2000
The problem is when the min and max are the same I end up with 1998 - 1998
Is there any way I can make an adjustment to just show the 1 year when this occurs.
Thanks
I've written the below formula and it work fine, It works out the Min and max years in a range eg. 1998 - 2000
The problem is when the min and max are the same I end up with 1998 - 1998
Is there any way I can make an adjustment to just show the 1 year when this occurs.
Code:
ActiveCell.FormulaR1C1 = _
"=TEXT(MIN(R[1]C:R[20]C), ""yyyy"") & "" - "" & TEXT(MAX(R[1]C:R[20]C), ""yyyy"")"
Thanks