is it possible to store formula under a UDF
You need to tell us what you are talking about. A UDF is meant to create a
custom formula to return a value. -- Don Guillett SalesAid Software "been drilbled to 2007" wrote in message ... hello, i got some few formulas that i need to be stored under a UDF. please respond if you can help me with this. dribler2 |
is it possible to store formula under a UDF
LOOKUP(WEEKDAY(T1),{1,2,3,4,5,6,7},{7,6,5,4,3,2,1} )
Hi. Just 2 cents. If I'm not mistaken, the above part might be reduced to the following: 8-WEEKDAY(T1) -- Dana DeLouis Windows XP & Office 2003 "Tom Ogilvy" wrote in message ... With Worksheets("Sheet1") set rng = .Range(T2:T2000) End With rng.Formula = "=IF(T1=LOOKUP(MAX(holidays),holidays),T1,IF(AND(W EEKDAY(T1)=1,LOOKUP(T1,holidays)=T1),T1+1,IF(OR(AN D(LOOKUP(T1,holidays)=T1,WEEKDAY(T1)=6),AND(LOOKUP (T1+2,holidays)=T1+2)),T1+1,MIN(T1+(LOOKUP(WEEKDAY (T1),{1,2,3,4,5,6,7},{7,6,5,4,3,2,1})),INDEX(holid ays,MATCH(T1,holidays,ROW(T1))+1)))))" or set rng = Range("N_WD") then as above. if you don't want the formula to refer to the cell above it, then you would need to add some dollar signs to fix the references. I have no idea what you are doing, so I can't say. -- Regards, Tom Ogilvy <snip |
All times are GMT +1. The time now is 06:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com