+ Reply to Thread
Results 1 to 2 of 2

Nested if problem

Hybrid View

  1. #1
    Registered User
    Join Date
    03-14-2006
    Posts
    1

    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),fourthtriplet,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

  2. #2
    JE McGimpsey
    Guest

    Re: Nested if problem

    Try using FALSE in the range_lookup argument of VLOOKUP (see help for
    details). That way the order in the lookup column doesn't matter.

    In article <samonly.24nvfb_1142342402.8155@excelforum-nospam.com>,
    samonly <samonly.24nvfb_1142342402.8155@excelforum-nospam.com> wrote:

    > 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).


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1