View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Simple problem complex solution?

On Wed, 8 Jul 2009 00:24:19 -0700 (PDT), Aaron
wrote:

Hi,

I have had this problem for quite a while and I couldnt get it
resolved on here before but I am hoping someone might be able to sort
it for me.

Here is the situation:

I have a column with 10 answer boxes in it.
Each box displays an "error" in the form of a number.
The boxes can have the same error or different errors or no errors.
The errors are typically anything from 0.00001 to 1.

I have a series of 5 more result boxes that I need to group the errors
in their most logical groupings into.

eg series 1

0
0.001
0
0.001
0
0
0
0.002
0.001
0

As a human looking at the numbers it is easy to group them logically
as:

First 4 numbers together, next 3 together, last 3 on their own each.
(I dont have to populate all 5 result boxes)

eg series 2

0
0
0
0
0
0
0
0.001
0.001
0

As a human looking at the numbers it is easy to group them logically
as:

First 7 numbers together, next 2 together, last 1 on its own. (I dont
have to populate all 5 result boxes)

Can this be done using code or is it better through complex nested if
statements to decide the groupings?

Thanks in advance.

Aaron.


In order to do this through code, you will need to set out the rules that you
are using to decide on your groupings.

For example, in your first set:

--------------------------
0
0.001
0
0.001
0
0
0
0.002
0.001
0
----------------------------

there are other groupings than the one you proposed that could be seen as
"logical groupings", depending on the logical rules you are using.
--ron