Macro to Calculate a Median

G

Guest

I am trying to use this sql. Does someone have vba code for calculating a
median ?

Switch([PriceC] = 0, [PriceD],
[PriceC] < 0.15, [PriceC],
[PriceB] <> 0 AND [PriceC] <> 0, MyMedian([PriceB], [PriceC]),
True, 0)

Thank you in advance.
 
G

Guest

Thank you. I read through the article but is is a bit over my head. Basically
I have 2 price fields and I need the median. I need to do this on each record
in the database. Is there an easy way ??

Douglas J. Steele said:
Take a look at my October, 2005 "Access Answers" column in Pinnacle
Publication's "Smart Access"

You can download the column (and sample database) for free at
http://www.accessmvp.com/djsteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


carl said:
I am trying to use this sql. Does someone have vba code for calculating a
median ?

Switch([PriceC] = 0, [PriceD],
[PriceC] < 0.15, [PriceC],
[PriceB] <> 0 AND [PriceC] <> 0, MyMedian([PriceB], [PriceC]),
True, 0)

Thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top