Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
To store the formula in a string | Excel Discussion (Misc queries) | |||
store address in a cell and use it in formula | Excel Discussion (Misc queries) | |||
store inventory sheet(ex:sports equipment store) | Excel Worksheet Functions | |||
Store formula in Cell | Excel Discussion (Misc queries) | |||
Store formula in Cell | Excel Discussion (Misc queries) |