View Single Post
  #6   Report Post  
Max
 
Posts: n/a
Default How do I use a UDF?

"Dorn" wrote
Unfortunately I don't know anything about visual basic,
this was made for me
by someone else (who's contact information I don't have).


That person was Bob Phillips
re his response to your post in .programming, http://tinyurl.com/9ogeq

(You should have followed through by responding to Bob
over in your .prog post.)

Does anyone know where I should add
the end statments that I'm missing?


Better still, how about a sample implementation ? :
http://cjoint.com/?lojn2DftiP
Dorn_prog.xls

Here's what I did to implement
the UDF GetTotals by Bob Phillips

In Excel,
Press Alt+F11 to go to VBE
Click Insert Module
Paste Bob's UDF*
into the code window on the right
(*corrected Bob's UDF lines for the dreaded
"inevitable" line breaks / wraps in the sample file <g)

Press Alt+Q to get back to Excel

Then in Sheet2, as Bob says in his response:
" enter =GetTotals("Sheet1",$A2,B$1) in b2 and copy over (copy across & fill
down)"

Format B2 as Time: "13:30:55" first
before you copy across and fill down
-------

Btw, I'll take it that my formulae suggestion to your other similar post in
..worksheet.functions,
http://tinyurl.com/ahvyu
somehow didn't quite make the final cut for you
(You didn't feedback further over there)
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--