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! -- jseabold ------------------------------------------------------------------------ jseabold's Profile: http://www.excelforum.com/member.php...o&userid=30990 View this thread: http://www.excelforum.com/showthread...hreadid=506548 |
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 |
All times are GMT +1. The time now is 08:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com