+ Reply to Thread
Results 1 to 2 of 2

Complex if test program possible? If "value" "value", paste "value" in another cell?

  1. #1
    Registered User
    Join Date
    01-30-2006
    Posts
    1

    Complex if test program possible? If "value" "value", paste "value" in another cell?

    I am fairly new to the world of Excel programming but have decent familiarity with the embedded functions. However, I was wondering if it is possible to write a program or perhaps a function (though I don't think a simple if test will work, but that's the basic idea, it just seems much too tedious!) which will go down through each cell in a column of many cells, evaluate that column, then evaluate another column, then possibly another column, and then paste a certain string of text in another column. For example, if A3 = "Disney", if B3 = "Orlando," if C3 = "August" then "Sweltering Heat" would be posted in D3. The if tests would also need to differentiate between hundreds of possible strings of text and the then result would need to able to post hundreds of different strings as well. Any help would be much appreciated. I'm not asking for the program to be written, just a general direction to go in. I'm pretty comfortable with a computer and programming once I know where to go. Thanks for any help!

  2. #2
    Dave Peterson
    Guest

    Re: Complex if test program possible? If "value" "value", paste "value"in another cell?

    Kind of like a =vlookup() based on multiple cells to match on?

    You can use this kind of syntax:

    =index(othersheet!$c$1:$c$100,
    match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet!$b$1:$b$100),0))
    (one cell)

    This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
    correctly, excel will wrap curly brackets {} around your formula. (don't type
    them yourself.)

    Adjust the range to match--but you can't use the whole column.

    And just keep adding more stuff to that product portion of the formula:

    =index(othersheet!$d$1:$d$100,
    match(1,(a2=othersheet!$a$1:$a$100)
    *(b2=othersheet!$b$1:$b$100)
    *(c2=othersheet!$c$1:$c$100),0))

    (still an array formula)

    jseabold wrote:
    >
    > I am fairly new to the world of Excel programming but have decent
    > familiarity with the embedded functions. However, I was wondering if
    > it is possible to write a program or perhaps a function (though I don't
    > think a simple if test will work, but that's the basic idea, it just
    > seems much too tedious!) which will go down through each cell in a
    > column of many cells, evaluate that column, then evaluate another
    > column, then possibly another column, and then paste a certain string
    > of text in another column. For example, if A3 = "Disney", if B3 =
    > "Orlando," if C3 = "August" then "Sweltering Heat" would be posted in
    > D3. The if tests would also need to differentiate between hundreds of
    > possible strings of text and the then result would need to able to post
    > hundreds of different strings as well. Any help would be much
    > appreciated. I'm not asking for the program to be written, just a
    > general direction to go in. I'm pretty comfortable with a computer and
    > programming once I know where to go. Thanks for any help!
    >
    > --
    > jseabold
    > ------------------------------------------------------------------------
    > jseabold's Profile: http://www.excelforum.com/member.php...o&userid=30990
    > View this thread: http://www.excelforum.com/showthread...hreadid=506548


    --

    Dave Peterson

+ 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