LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Mike Echo
 
Posts: n/a
Default Difficult (for me) formula/UDF calculation

I need a formula and am finding it difficult. I created a UDF to avoid
hassles with #VALUE! etc (sometimes a "?" is entered so I can't divide
it), giving me trouble but am stuck on this.

Imagine I have to take samples from a number of containers. The number
of samples needed (every 4th container, every 20th, etc) varies
according to source. There must always be a minimujm of 2 samples if the
containers number more than 1.

Assuming every 3rd container is to be sampled,

In my UDF I have a select case with
case 1 sample = 1 (this covers 1st)
case 2 to number_of_containers+1 sample = 2 (this covers 1st & 4th)
else

It is the else bit that has me stumped. I had

= total_containers/skip_rate + 1 but she no work.

I find it hard because I am not mathematically inclined and the fact
that the samples required change from every 3rd, 4th and up to 60th
really throws me. Is there something staring me in the eye that I'm not
seeing? Probably.

So, given 44 containers, if I need every 3rd, how can I calculate it?
The same calculation has to work with every 7th, every 11th, etc.

TIA.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a check box to accept a calculation Joejoethecrackman Excel Discussion (Misc queries) 5 March 22nd 05 08:47 PM
Auto Calculation Automatically Turns Off???? Jeff K. Excel Discussion (Misc queries) 2 December 15th 04 01:39 AM
Help with calculation Jim Excel Worksheet Functions 0 November 17th 04 10:52 PM
Help on automatically ending a calculation Jim Excel Worksheet Functions 0 November 11th 04 09:42 PM
time-clock calculation dokliver Excel Worksheet Functions 3 October 28th 04 09:07 PM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"