View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H. Mike H. is offline
external usenet poster
 
Posts: 471
Default number seperation

This would be a whole lot easier to do if you did it via VBA in code instead
of a formula. You'd have to have the code determine if the cell that was
last changed was one of the "number" cells. Then you'd do your analysis:

if Thatcell=36 then
Thatcell.column+1=1
elseif Thatcell=44 then
Thatcell.column+1=1
etc.....

You should be able to find examples for doing this in other postings. If
not, let me know and I can set you up...

" wrote:

i have this formula so i can seperate a set of number when needed. for
example a selected amount of diffrent numbers will equal a specific
number. i need to add more to this formula so i can have it
completed.

=IF(OR(--MID(B1,3,3)={31,32,33,34,85,86,139,140,141}),LOOKU P(--
MID(B1,3,1),Â*{1,3,8},{15,12,14}),IF(AND(--MID(B1,3,3)213,--
MID(B1,3,3)<227),10,IF(OR(--Â*
MID(B1,3,3)={19,21,22,24,25,26,27,28,29,30,35}),13 ,IF(OR(AND(--
MID(B1,3,3)Â*145,--MID(B1,3,3)<160),AND(--MID(B1,3,3)200,--
MID(B1,3,3)<208)),6,IF(OR(ANÂ*D(--MID(B1,3,3)62,--
MID(B1,3,3)<79),AND(--MID(B1,3,3)86,--MID(B1,3,3)<92)Â*,AND(--
MID(B1,3,3)96,--MID(B1,3,3)<136)),11,1+INT((--MID(B1,3,3)-1)/
10))))Â*))

this the set of numbers. the ones on the right have to equal the ones
on the left.
1= 36,44,45,46
3= 37,38,39,54,55
5= 40-43
6= 47,48,49, 146-159, 201-210
7= 23, 83,84, 211
10= 212,214, 227
11= 57-82, 87-136, 163,167, 199, 213
12= 31-34
13= 21,22, 24-30, 160-197
14= 85,86
15= 139-141
16= 1,2,13,14,17,18,53
17= 3,4,15,16,20
19= 50,51,52
20= 19
22= 142-145

thanks for any help provided.