Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
Hi,
Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
=(COUNTIF(A2:D2,A1)0)+0
"Divya" wrote: Hi, Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
Maybe this:
=--(COUNTIF(A2:D2,$A$1)0) -- Biff Microsoft Excel MVP "Divya" wrote in message ... Hi, Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
While I would go with the COUNTIF method already posted, I just thought it
interesting that this simple array-entered** formula works also... =OR($A$1=A2:D2) **Commit formula using Ctrl+Shift+Enter, not just Enter by itself. -- Rick (MVP - Excel) "Divya" wrote in message ... Hi, Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
This one doesn't required "array-entered"
=--OR(INDEX(A2:D2=$A$1,)) "Rick Rothstein" wrote: While I would go with the COUNTIF method already posted, I just thought it interesting that this simple array-entered** formula works also... =OR($A$1=A2:D2) **Commit formula using Ctrl+Shift+Enter, not just Enter by itself. -- Rick (MVP - Excel) "Divya" wrote in message ... Hi, Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
But it is SO much longer... <bg
-- Rick (MVP - Excel) "Teethless mama" wrote in message ... This one doesn't required "array-entered" =--OR(INDEX(A2:D2=$A$1,)) "Rick Rothstein" wrote: While I would go with the COUNTIF method already posted, I just thought it interesting that this simple array-entered** formula works also... =OR($A$1=A2:D2) **Commit formula using Ctrl+Shift+Enter, not just Enter by itself. -- Rick (MVP - Excel) "Divya" wrote in message ... Hi, Can I write this a better/simpler way? IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0) Basically comparing a range of cells to one value and returning 1 if true, and 0 if false Much appreciated! |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help simplifying IF OR formula
@ Mama you formula is cool ....... @Rick your formula is short but will not return 1 or 0 until & unless you will use negation .... =--(OR($A$1=A2:D2)) press Ctrl+Shift+Enter (CSE) Teethless mama;352666 Wrote: [color=blue] This one doesn't required "array-entered" =--OR(INDEX(A2:D2=$A$1,)) "Rick Rothstein" wrote: While I would go with the COUNTIF method already posted, I just thought it interesting that this simple array-entered** formula works also... =OR($A$1=A2:D2) **Commit formula using Ctrl+Shift+Enter, not just Enter by itself. -- Rick (MVP - Excel) -- mubashir aziz If this post helps Don't 4get to click Yes ------------------------------------------------------------------------ mubashir aziz's Profile: http://www.thecodecage.com/forumz/member.php?userid=237 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=98697 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simplifying/speeding up this formula | Excel Worksheet Functions | |||
Simplifying a formula | Excel Worksheet Functions | |||
Simplifying Formula (part 1) | Excel Discussion (Misc queries) | |||
Simplifying Formula (Part 2) | Excel Discussion (Misc queries) | |||
Simplifying formula | Excel Discussion (Misc queries) |