View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
samonly
 
Posts: n/a
Default Nested if problem


I've got stuff in a sheet that looks like this (it is about words and
their letters' probabilities of co-occurrence)

+be bee eef efyfy# 356 26 11 6 103 all in different columns. I want
to have a column which says "efy" and another "6". The "6" bit is
easy to achieve with "min" and for the "efy bit this formula lets me
work out which letter triplet has the minimum frequency within each
word:

=IF(firstno=MIN(numbers),firsttriplet,IF(secondno= MIN(numbers),secondtriplet,IF(thirdno=MIN(numbers) ,thirdtriplet,IF(fourthno=MIN(numbers),fourthtripl et,IF(fifthno=MIN(numbers),fifthtriplet,"")))))

deliberately not absolute cell references so I can copy the formula
down the sheet. But it is limited by the 7 nested if thing to words
which are below 7 letters I think. I have tried calling the function a
name and getting round the problem that way but it just returns the
!#value error when I try to use it (don't know why).

I can't use any of the lookup or index type functions because the
numbers are not in numerical order. (I tried pasting the lot
(transposed) into a new worksheet and it only works for some values and
not others).

I have never used vba, not sure how even to start. So at the moment
I'm going to have to look do all the longer words by hand. Any advice
would be gratefully received.

A confused postgrad


--
samonly
------------------------------------------------------------------------
samonly's Profile: http://www.excelforum.com/member.php...o&userid=32439
View this thread: http://www.excelforum.com/showthread...hreadid=522140