Home |
Search |
Today's Posts |
#1
|
|||
|
|||
IF statement(?)
Hi, I'm wondering if some kind person might be able to help with a problem I have in putting together the correct "IF" statement. I'll try and be as clear as possible (what I'm actually trying to accmplish is pretty simple - but I can't get the formula right): (a) Column A has numbers (b) Column B has numbers In the calculation column (say, column C will do!) I want it to look at a few conditions, and if met, put a word in that column (say, "fish"!) Let's start down the list a little way in cell C6, because it refers back to 5 numbers in column B and 1 number in column C. Okay, these are the simple conditions: (remember, we're starting in cell C6) (1) If B6 is greater than B5 (2) And B6 is also greater than A5 (next door) (2) And B6 is also less than B4, less than B3, less than B2 and less than B1 Then put the word "FISH" there. I do not want it to put anything if those conditions are not met. Does anyone know how to write the correct IF statement to do this? (Please note: if it MUST say something when the conditions are not met, I can live with that). Thanking you heaps, Steve -- contrarian ------------------------------------------------------------------------ contrarian's Profile: http://www.excelforum.com/member.php...o&userid=10009 View this thread: http://www.excelforum.com/showthread...hreadid=472085 |
#2
|
|||
|
|||
Hi,
In C6, enter the formula =IF(AND(B6B5,B6A5,B6<MIN(B1:B4)),"FISH","") Please note that if B6 happens to be equal to one of the numbers in the other six cells you are comparing it with, the conditions are NOT met, and therefore the formula would return a blank in C6. Regards, B. R. Ramachandran "contrarian" wrote: Hi, I'm wondering if some kind person might be able to help with a problem I have in putting together the correct "IF" statement. I'll try and be as clear as possible (what I'm actually trying to accmplish is pretty simple - but I can't get the formula right): (a) Column A has numbers (b) Column B has numbers In the calculation column (say, column C will do!) I want it to look at a few conditions, and if met, put a word in that column (say, "fish"!) Let's start down the list a little way in cell C6, because it refers back to 5 numbers in column B and 1 number in column C. Okay, these are the simple conditions: (remember, we're starting in cell C6) (1) If B6 is greater than B5 (2) And B6 is also greater than A5 (next door) (2) And B6 is also less than B4, less than B3, less than B2 and less than B1 Then put the word "FISH" there. I do not want it to put anything if those conditions are not met. Does anyone know how to write the correct IF statement to do this? (Please note: if it MUST say something when the conditions are not met, I can live with that). Thanking you heaps, Steve -- contrarian ------------------------------------------------------------------------ contrarian's Profile: http://www.excelforum.com/member.php...o&userid=10009 View this thread: http://www.excelforum.com/showthread...hreadid=472085 |
#3
|
|||
|
|||
contrarian, try in C6 IF(AND(B6B5,B6A5,B6<B4,B6<B3,B6<B2,B6<B1),"fish" ,"") HTH -- Casey ------------------------------------------------------------------------ Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545 View this thread: http://www.excelforum.com/showthread...hreadid=472085 |
#4
|
|||
|
|||
Hi Steve,
C6: =IF(AND(B6A5, B6B5, B6<B4, B6<B3, B6< B2, B6<B1),"FISH","") If the conditions are not met an empty string is inserted in the cell, the cell will never test as ISBLANK because it has a formula. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "contrarian" wrote ... Okay, these are the simple conditions: (remember, we're starting in cell C6) (1) If B6 is greater than B5 (2) And B6 is also greater than A5 (next door) (2) And B6 is also less than B4, less than B3, less than B2 and less than B1 Then put the word "FISH" there. I do not want it to put anything if those conditions are not met. Does anyone know how to write the correct IF statement to do this? (Please note: if it MUST say something when the conditions are not met, I can live with that). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
IF Statement nightmare | Excel Discussion (Misc queries) | |||
IF Statement | New Users to Excel | |||
Statement | Excel Worksheet Functions |