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

J

jseabold

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

Dave Peterson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top