Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement only shows value in first cell
I'm trying to use an IF statement to find a value in a row array, and return
that text value in the formula cell. 1 a b c d e 2 101 INDUSTRIES brass 3 LIGHTING HOME nickel 4 FRANKFURT brass nickel stainless copper 5 Jersey copper 6 Dallas nickel stainless cooper brass {=IF(b2:e2="brass,"brass",0)} next cell down would have {=IF(b3:e31="brass,"brass",0)} If "brass" is in the first cell of the array, it returns "brass". If it in in cells c2,d2,or e2, it returns a 0. What am I doing wrong? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement only shows value in first cell
If you have a group of cells and want to know if some text is in ANY of them,
use COUNTIF: =IF(COUNTIF(B2:E2,"Brass")0,"Brass",0) -- Gary''s Student - gsnu200812 "Mea" wrote: I'm trying to use an IF statement to find a value in a row array, and return that text value in the formula cell. 1 a b c d e 2 101 INDUSTRIES brass 3 LIGHTING HOME nickel 4 FRANKFURT brass nickel stainless copper 5 Jersey copper 6 Dallas nickel stainless cooper brass {=IF(b2:e2="brass,"brass",0)} next cell down would have {=IF(b3:e31="brass,"brass",0)} If "brass" is in the first cell of the array, it returns "brass". If it in in cells c2,d2,or e2, it returns a 0. What am I doing wrong? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement only shows value in first cell
Hi,
You can use this short version: =IF(COUNTIF(B3:E3,"brass"),"brass",) -- Thanks, Shane Devenshire "Mea" wrote: I'm trying to use an IF statement to find a value in a row array, and return that text value in the formula cell. 1 a b c d e 2 101 INDUSTRIES brass 3 LIGHTING HOME nickel 4 FRANKFURT brass nickel stainless copper 5 Jersey copper 6 Dallas nickel stainless cooper brass {=IF(b2:e2="brass,"brass",0)} next cell down would have {=IF(b3:e31="brass,"brass",0)} If "brass" is in the first cell of the array, it returns "brass". If it in in cells c2,d2,or e2, it returns a 0. What am I doing wrong? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
If statement only shows value in first cell
Hi,
You may also try this array formula =if(or((a3:b3="brass"),"brass","")) -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Mea" wrote in message ... I'm trying to use an IF statement to find a value in a row array, and return that text value in the formula cell. 1 a b c d e 2 101 INDUSTRIES brass 3 LIGHTING HOME nickel 4 FRANKFURT brass nickel stainless copper 5 Jersey copper 6 Dallas nickel stainless cooper brass {=IF(b2:e2="brass,"brass",0)} next cell down would have {=IF(b3:e31="brass,"brass",0)} If "brass" is in the first cell of the array, it returns "brass". If it in in cells c2,d2,or e2, it returns a 0. What am I doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cant change the cell format it shows too many different cell form | Excel Worksheet Functions | |||
format a cell with a formula so an empty reference cell shows blan | Excel Discussion (Misc queries) | |||
Cell only shows link in text, not contents of reference cell | New Users to Excel | |||
cell shows 20. Formula shows 20. why not 540/27 | Excel Worksheet Functions | |||
Custom format that shows blank cell if another cell is empty | Excel Discussion (Misc queries) |