+ Reply to Thread
Results 1 to 3 of 3

Loop through rows of list & logical test - vba function?

  1. #1
    Registered User
    Join Date
    11-13-2007
    Posts
    5

    Loop through rows of list & logical test - vba function?

    Howdy everyone,

    In the excel file, have a look at the blue table and click on 'cell B9'.

    There is an IF function with 7 other IF functions nested in it. Its purpose is to run through the cells A25 to A134 (but only the cells with a bolded frame), to check which one – there can only be one – has a value equal to 1, and to give as output the content of the cell that is next to the right of that cell.

    Example:

    If I call this function on B9, the cell in the range A25 to A134 whose value is equal to 1 is the cell A25 and, therefore, the output of the function is the letter ‘A’ (value of cell B25).

    My question

    The problem is that this function does not screen A25 to A134 but ‘only’ A25 to A67… This is because you can only nest a maximum of 7 functions within a function.

    Does anybody know what I should do to solve this problem? I guess I would have to start writing a function in VBA or something like that… But the problem is I don’t know anything about that (crappy) language…

    I send an S.O.S. to the world…

    (Thanks anyway)

    Xavier
    Attached Files Attached Files

  2. #2
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Hi Sauvenix,

    You could put this code into the Worksheet_Change part of your workbook and give it a go.

    Please Login or Register  to view this content.
    Hope this helps

    Seamus

  3. #3
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Sorry,

    Misread your original post about wanting to fine the value of the cell to the right of the 1.

    Change the line

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

+ 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