malik641
Board Regular
- Joined
- Sep 6, 2005
- Messages
- 65
I need to place this formula into 120,000 cells. Problem is, the workbook becomes quite LARGE (around 25MB extra from THESE cells alone) if I copy and paste the following formula into 10,000 rows by 12 columns.
Here's the formula with an explanaition following:
=IF(OR(Forecast!G2="",Actual!G2=""),"",IF(ISERROR(OR(DATEDIF(Forecast!G2,Actual!G2,"Y"),DATEDIF(Forecast!G2,Actual!G2,"ym"),DATEDIF(Forecast!G2,Actual!G2,"md"))),"",IF(AND(DATEDIF(Forecast!G2,Actual!G2,"Y")=0,DATEDIF(Forecast!G2,Actual!G2,"ym")=0,DATEDIF(Forecast!G2,Actual!G2,"md")=0),"Projected: "&TEXT(Forecast!G2,"dd-mmm-yyyy")&CHAR(10)&"On Time","Projected: "&TEXT(Forecast!G2,"dd-mmm-yyyy")&CHAR(10)&DATEDIF(Forecast!G2,Actual!G2,"Y")&" Years "&DATEDIF(Forecast!G2,Actual!G2,"ym")&" Months "&IF(DATEDIF(Forecast!G2,Actual!G2,"md")<=0,"0 Days",DATEDIF(Forecast!G2,Actual!G2,"md")&" Days"))))
This formula calls on two sheets: Forecast and Actual
Forecast and Actual contain dates on when the user thinks something will happen (hence, forecast) and when that something ACTUALLY does happen (and of course, Actual).
If the date on Actual exceeds the date on Forecast, it is considered late. Here is some sample data and results for late and on time dates.
Late
Forecast:
G2= 5/25/2005
Actual:
G2= 5/26/2005
Result from formula:
Projected: 5/25/2005
0 Years 0 Months 1 Days
On Time
Forecast:
G2= 5/25/2005
Actual:
G2= 5/20/2005
Result from formula:
Projected: 5/25/2005
On Time
And if either date is missing, it returns a blank.
Maybe I should reconsider the style of the results?
Thanks in advance[/b]
Here's the formula with an explanaition following:
=IF(OR(Forecast!G2="",Actual!G2=""),"",IF(ISERROR(OR(DATEDIF(Forecast!G2,Actual!G2,"Y"),DATEDIF(Forecast!G2,Actual!G2,"ym"),DATEDIF(Forecast!G2,Actual!G2,"md"))),"",IF(AND(DATEDIF(Forecast!G2,Actual!G2,"Y")=0,DATEDIF(Forecast!G2,Actual!G2,"ym")=0,DATEDIF(Forecast!G2,Actual!G2,"md")=0),"Projected: "&TEXT(Forecast!G2,"dd-mmm-yyyy")&CHAR(10)&"On Time","Projected: "&TEXT(Forecast!G2,"dd-mmm-yyyy")&CHAR(10)&DATEDIF(Forecast!G2,Actual!G2,"Y")&" Years "&DATEDIF(Forecast!G2,Actual!G2,"ym")&" Months "&IF(DATEDIF(Forecast!G2,Actual!G2,"md")<=0,"0 Days",DATEDIF(Forecast!G2,Actual!G2,"md")&" Days"))))
This formula calls on two sheets: Forecast and Actual
Forecast and Actual contain dates on when the user thinks something will happen (hence, forecast) and when that something ACTUALLY does happen (and of course, Actual).
If the date on Actual exceeds the date on Forecast, it is considered late. Here is some sample data and results for late and on time dates.
Late
Forecast:
G2= 5/25/2005
Actual:
G2= 5/26/2005
Result from formula:
Projected: 5/25/2005
0 Years 0 Months 1 Days
On Time
Forecast:
G2= 5/25/2005
Actual:
G2= 5/20/2005
Result from formula:
Projected: 5/25/2005
On Time
And if either date is missing, it returns a blank.
Maybe I should reconsider the style of the results?
Thanks in advance[/b]